Category: C Language
How to ROUND Value in C Language: (1) In this blog we will see how to Round value in C Language. (2) In there are two functions which round value. 1. CEIL() and 2. FLOOR(). (3) CEIL(): It is used for round value Upwards. (4) FLOOR(): It is used for round value Downwards. (5) For using …
Function Declaration in C Language: (1) In this blog we will see how to declare Function in C Language. (2) It is recommended for optimizing the code. It should be advisable to write separate function definitions and function declarations. (3) You can add as many parameters as you want. (4) Sample C language code and its …
Create and Use Function with Parameters in C: (1) FUNCTION in C language is already explained in the blog “How to create and use Function in C Language”. In this blog, we will see how to pass parameters in the function to get results. (2) You can add as many parameters as you want. (3) Sample …
Create and Use FUNCTION in C Language: (1) FUNCTION is a set of code that runs when it is called. In this blog, we will see how to create and called FUNCTION in C language. (2) Advantage of creating FUNCTION is that they are reused. Means defining the code once and using FUNCTION many times. (3) …
Continue Statement in C Language: (1) The continue is another jump statement like the break statement as both the statements skip over a part of the code. But the continue statement is somewhat different from the break. Instead of forcing termination, it forces the next iteration of the loop to take place, skipping any code in …
Break Statement in C language: (1) The break statement enables a program to skip over part of the code. A break statement terminates the smallest enclosing while, do-while, for or switch statement. Execution resumes at the statement immediately following the body of the terminated statement. (2) Sample C language code and its output, as shown: #include …
Assignment Operators in C Language: (1) Assignment Operators are used for assigning values to variables. (2) Sample C language code and its output, as shown: #include <stdio.h>#include <conio.h>// Assignment Operators in C Languageint main(){int x; x = 5;printf(“Value of ‘=’: %d\n”, x); x = x + 10;printf(“Value of ‘+’: %d\n”, x); x = x – 9;printf(“Value …
ARRAY in C Language: (1) An Array is a collection of variables of the same type that are referenced by a common name. It is used for storing multiple values in one variable. (2) Sample C language code and its output, as shown: #include <stdio.h>#include <conio.h>//Assign 1-10 values in one variable x container having array of …
DO WHILE Loop in C Language: (1) Unlike the for and while loops, the do-while is an exit-controlled loop i.e. it evaluates its test-expression at the bottom of the loop after executing its loop-body statements. This means that a do-while loop always executes at least once. In other two loops for and while, the test-expression is …
WHILE Loop in C Language: (1) The while statement executes a block of code repeatedly as long as the control condition of the loop is true. The control condition of the while loop is executed before any statement inside the loop is executed. (2) Sample C language code and its output, as shown: #include <stdio.h>#include <conio.h>//Table …