Posts

Operators of C Programming

An operator is a symbol that operates on a value or a variable . For example: + is an operator to perform addition . C has a wide range of operators to perform various operations. C Arithmetic Operators An arithmetic operator performs mathematical operations such as addition, subtraction, multiplication, division, etc on numerical values (constants and variables). Operator Meaning of Operator + addition or unary plus - subtraction or unary minus * multiplication / division % remainder after division (modulo division) Example 1: Arithmetic Operators Include:- // Working of arithmetic operators #include <stdio.h> int main() {     int a = 9,b = 4, c;          c = a+b;     printf("a+b = %d \n",c);     c = a-b;     printf("a-b = %d \n",c);     c = a*b;     printf("a*b =...

Input/Output process in C Programming

C Output In C programming, printf() is one of the main output function. The function sends formatted output to the screen . Examples are as follow:-  Example 1:   (Welcome to my BLOG)  Output Input:-  #include <stdio.h>     int main() {      // The strings are displayed inside the quotations mark     printf(" Welcome to my BLOG ");     return 0; } Output:- Welcome to my BLOG How does this program work? All valid C programs must contain the main() function. The code execution begins from the start of the main() function. The printf() is a library function to send formatted output to the screen. The function prints the string inside quotations. To use printf() in our program, we need to include stdio.h header file using the #include <stdio.h> statement. The return 0; statement inside the main() function is the "Exit status" of the program. It's optional . Example 2: Integer Output Input:- #inc...