What is the use of Do While Loop? Unlike for and while loops, which test the loop condition at the top of the loop, the do…while loop in C programming checks its condition at the bottom…
Month: January 2021
Using multi-dimensional arrays
How To Use Multi Dimensional Arrays? C programming language allows multidimensional arrays. Here is the general form of a multidimensional array declaration − type name[size1][size2]…[sizeN]; For example, the following declaration…
Misc. Operators
Misc. Operators Besides the operators discussed above, there are a few other important operators including sizeof and ? : supported by the C Language. Operator Description Example sizeof() Returns the size of a variable.…
Assignment Operators
Assignment Operators The following table lists the assignment operators supported by the C language − Operator Description Example = Simple assignment operator. Assigns values from right side operands to left…
Bitwise Operators
Bitwise Operators Bitwise operator works on bits and perform bit-by-bit operation. The truth tables for &, |, and ^ is as follows − p q p & q p |…
Use of while
How to use while loop? A while loop in C programming repeatedly executes a target statement as long as a given condition is true. Syntax The syntax of a while loop in C programming…
Program loops and iterations
How to Loops and Iterations? Programming languages provide various control structures that allow for more complicated execution paths. A loop statement allows us to execute a statement or group of…
Nesting if and else
How to use Nested if and else? It is always legal in C programming to nest if-else statements, which means you can use one if or else if statement inside another if…
Conditional program execution
Need For Conditional program execution: Decision making structures require that the programmer specifies one or more conditions to be evaluated or tested by the program, along with a statement or…
Functions with array
Passing Arrays as Function Arguments in C If you want to pass a single-dimension array as an argument in a function, you would have to declare a formal parameter in…