C Language Archive

Nested for loop in C

Nested for loop: Defining for loop inside another for loop. Using nested loops, we can process 2 dimensional data (rows & columns). Outer loop represents number of rows Inner loop represents number of columns. Output: …

goto in C

goto: It is a keyword. It is a branching statement It is used to send the cursor from one location to another location in C program. Goto statements transfer the control using labels. Label is …

do while loop in C

do-while loop: While : Check the condition and execute the block. Repeat loop as long as the condition is valid. Do-while: Execute the block for the first time without checking the condition. The Loop repetition …

Functions in C

Function: Function is block of instructions that performs a task. C Program execution starts with main() function. OS invokes main() function automatically to start the program. The prototype(syntax) of main() function as follows: The prototype …

Functions Classification in C

Functions classified into: No arguments No return values With argument No return values With arguments With return values No argument with return values Recursion No arguments and No return values: In this case, the function …

With arguments With return values Function in C

With arguments and No return values: We need to pass input values while calling the function. Input values are also called parameters. We declare variables(arguments) to collect these input values. Even number code using functions: …

Recursion in C

Recursion: Function calling itself is called recursion. Calling the function from the definition of same function. Note: Every function in program executes from Stack memory. While executing the program, if the stack is full then …

Codes on C functions

Function arguments: Arguments of function working like local variables. Local variables can access only from the same function. Output this code: In function call, all arguments execute from right to left Output this code: Crack …

Recursion Programs in C

Code: Find the factorial using recursion: Print 1 to 10 numbers using recursion: Print 10 to 1 numbers using recursion:

Courses Enquiry Form