Comments in C

Comments are used to comment on the line of code in the program. Comments are a way of inserting remarks and reminders into code without affecting its behavior. The compiler ignores comments, treating them as though they were whitespace. There are two types of...

Escape Sequence in C

An escape sequence is a sequence of character that used inside the string literal or character.  All the escape sequence is used with the backslash (\) symbol. The list of an Escape sequence is as follows: Escape Sequence Meaning \a Alarm or Beep \b Backspace \f Form...

Storage Class in C

C storage class is used to define the scope variables and function. There are four various types of storage classes that are given below. auto: The auto keyword is the default storage class for all the local variables. Let us consider an example. { int mount; auto int...

C Decision control statement

Decision Making C conditional statements are used to specify one or more conditions. The statements will be executed if the condition becomes true otherwise alternative statement will be executed if the condition becomes false. C language supports the following...

Loop Statement in C

Loop statement is used to execute one or more statement repeatedly multiple times. There are three types of loops in C language. Why use loop? We can use loop because it executes a block of code multiple times and it reduces the length of the code. Example:  Let...

Break, continue and goto statement in C

Break statement Break statement is used to break the process of a loop (while, do while and for) and switch case. Syntax: break; 123  Syntax: break;  Example 1 while(test Expression) { // codes if(condition for break){ break; } // codes } 12345678910...

Type Casting in C

Type casting is a way to convert a variable from one data type to another data type. Syntax: (type) expression; 123  (type) expression;          Example: #include <stdio.h> int main() { int a,b; float sum; printf("Example of Type Casting\n");...

Function in C

Function is a group of statements that are used to perform any task. In other words, we can say that a function is a self- contained a block of programs that perform a coherent task. Why to use function A function is used to divide a large code into modules that help...

Recursion in C

Recursion is a programming technique that allows the programmer to call the function within the same function. The function which calls the same function is known as recursive function but a function that calls itself and doesn’t perform any task after function call...

String in C

String is a collection of character or group of characters. In array, string of character is terminated by a null value “\0” and enclose between double quote. We can declare string in two ways: By char array. By string literal Let us consider how to declare of string...

Pin It on Pinterest