Array and Matrix programming exercises and solutions in C

Array is a linear data structure that hold finite sequential collection of homogeneous data. We can store a collection of values in an array.

Array uses an integer value index to access a specific element. Index starts from 0 and goes till N-1 (where N is the size of array).

Read more

How to create new C/C++ project in CodeBlocks

Hello friends, being a beginner to C/C++ everyone once had this question Where to write C/C++ codes? How to compile it? How to run it?. Codeblocks provides an ultimate solution to all these mentioned problems.

Code::Blocks is a IDE(Integrated Development Environment) for creating C/C++ projects. It is simple to use and provides very basic but powerful interface. CodeBlocks can be used for creating, editing, compiling, running and debugging C/C++ projects. Here is a beginner guide to use CodeBlocks.

Before preceding you must have Codeblocks with C/C++ compiler installed in your computer. If you don’t have Codeblocks installed download and install it before moving to the next step.

Read more

Switch case programming exercises and solutions in C

switch case is a branching statement used to perform action based on available choices, instead of making decisions based on conditions. Using switch case you can write more clean and optimal code than if else statement.

switch case only works with integer, character and enumeration constants.

In this exercises we will focus on the use of switch case statement. We will learn where to implement switch case statement other than if else statement.

Read more

If else programming exercises and solutions in C

if...else is a branching statement. It is used to take an action based on some condition. For example – if user inputs valid account number and pin, then allow money withdrawal.

If statement works like “If condition is met, then execute the task”. It is used to compare things and take some action based on the comparison. Relational and logical operators supports this comparison.

Read more

What is ASCII character code?

ASCII stands for American Standard Code for Information Interchange. It was developed by ANSI (American National Standards Institute). It is a set of decimal coded value for all basic printable and non-printable characters. For example – A is represented as 65 in ASCII standard. Similarly, there exists an integer value to represent every printable and … Read more

Basic programming exercises and solutions in C

C programming is a stepping stone for many programmers in the programming world. C is best to learn internals of programming and know how a computer program works internally.

Since it is close to low level programming. Programming in C can be a nightmare for beginners if not practiced properly. However, you can learn and practice at Codeforwin step by step.

In this programming exercise we will focus on basics of C programming. After completing this exercise you will learn basic structure and semantics of a C program and how to write mathematical programs in C.

Read more