C – One Dimensional Array

What is One Dimensional Array in C? An array with only one subscript is known as a one-dimensional array.Example: int arr[10]. Syntax: Declaration of 1D Array in C: For declaration, the programmer needs to specify the type of element and number of elements in an array. Certain rules for declaring One Dimensional Array The declaration must … Read more

C – Function

A function refers to a block of code that performs a specific task. We can divide and create a separate function in a program so that each function performs a different specific task and can be called as many times as needed in the program. At least one pre-defined function is always executed by the … Read more

C – Call by Value and Call by Reference with Example

There are two ways in which the argument can be passed through a function in C Programming. Call by Value Call by Reference Call by Value in C. In this method, the actual argument is copied to the formal parameter of the function. Hence any operation performed on the argument does not affect the actual … Read more

C – goto statement

goto statement in c allows the user in the program to jump the execution to the labeled statement inside the function. The label (tag) is used to spot the jump statement. NOTE: Remember the use of goto is avoided in programming language because it makes difficult to trace the control flow of a program, making … Read more

C – continue statement

In C programming, the continue statement works like a break statement, instead of terminating the loop the continue statement skips the code in between and pass it to the next iteration in the loop. continue statement Flowchart: Syntax of continue statement: In the for loop, continue statement skips the test condition and increment value of … Read more

C – break statement

break statement in C is mostly used in a switch statement to terminate the cases present in switch statement. It terminates the loop and transfers the execution process immediately to statement following the loop. The use of break statement in nested loops terminates the inner loop and the control is transferred to the outer loop. … Read more

C- Loop control statement

Loop control statements are also known as Jump statement. The use of jump statement changes the state of execution. This statement help in exiting the loops statement. C supports three control statements. break statement continue statement goto break statement in C break statement is mostly used in a switch statement to terminate the cases present … Read more

C – do while loop

do-while loop in C is just as same as while loop, the only difference is that in do-while the condition is always executed after the loop as shown in the syntax below. Unlike while loop, where the body of the loop is executed only if the condition stated is true but in the do-while loop, … Read more

C – while Loop

A while loop is a straightforward loop and is also an entry-control loop. It evaluates the condition before executing the block of the loop. If the condition is found to be true, only then the body of the loop is executed. The loop continues until the condition stated is found to be false. while loop … Read more

C – for loop

In C programming, for loop is a more efficient loop structure and is an entry-control loop. The iteration continues until the stated condition becomes false. It has three computing steps as shown in the syntax below. for loop Flowchart: Syntax of for loop. Example of for loop in C Program. The output of for loop in C … Read more