Category

C Tutorial

76 posts

index.ts
</>

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

March 12, 2021 Read more →
index.ts
</>

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 progr

March 12, 2021 Read more →
index.ts
</>

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

March 12, 2021 Read more →
index.ts
</>

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 i

March 12, 2021 Read more →
index.ts
</>

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

March 12, 2021 Read more →
index.ts
</>

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, … Rea

March 12, 2021 Read more →
index.ts
</>

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 loo

March 12, 2021 Read more →
index.ts
</>

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.

March 12, 2021 Read more →
index.ts
</>

C – Loops

There may be times in a program where a block of code needs to be executed several times sequentially. In such cases, Loops are used to execute a sequence of statements many times until the stated condition becomes false. Two Types of Loops in C Programming. 1. Entry controlled loop: In this type lo

March 12, 2021 Read more →
index.ts
</>

C – switch statement

A switch statement allows a variable to be tested for equality against multiple values and each of those values is called a case. It can be used instead of nested if…else. Switch expression and case value must be of the same type. There must be at least one case or multiple cases with unique c

March 12, 2021 Read more →
index.ts
</>

C – nested switch statement

The use of switch statement inside another switch statement is called nested switch statement. Syntax Syntax of nested switch statement in C: Example of nested switch statements in C: The output of nested switch statements in C. The OUTER Switch. The INNER Switch.

March 12, 2021 Read more →