Tag c programming

Passing Arrays into Functions

In previous two posts we discussed about arrays and functions. In following simple program we will create a function which will accept an array as an input. Furthermore that function will multiply each element of the array with 20. At the…

Arrays in C Programming

Arrays in C Programming: Array is a type of variable which can store multiple items of the same data type. In following simple program we will define an array of 10 elements. After that we will multiply each element of…

How to use while loop in C Programming

  Sometimes in C program we need to repeat statements for certain number of times. So in order to repeat statements for number of times we use repetition structure in C programming. There are 3 types of repetition structures available…

How to use for loop in C Programming

  For loop is also a type of repetition structure. This repetition structure is simpler in syntax as compared with other 2 loops because all four loop conditions can be defined in single line. Following simple program explains how to…

How to define variables in c programming

In our previous post we discussed about how to get values from user. Sometimes we need to define variables and assign values to those variables. This simple program explains how to define variables and how to assign values to the variables…

How to use if statement in C Programming

  If statement is called as selection structure in C Programming. If statement checks a condition and proceed further depending upon the fact that whether the condition being checked is true or false. In simple words it says “Do something…