04 C Programming
04 C Programming
INDEX
1 Constants in C
2 Operators in C
3 Escape Sequence C
4 Format Specifier in C
CONSTANTS IN C
A constant is a value or variable that can't be changed
in the program,
Integer constant,
Floating constant,
Character constant, or
String constant.
Integer Constant 10, 20, 450 etc.
#include <stdio.h>
#include <conio.h>
void main(){
getch();
}
OUTPUT
Program :
#include <stdio.h>
int main() {
int mul;
return 0;
}
OUTPUT
OPERATORS IN C
An operator is simply a symbol that is used to perform
operations.
➢ Arithmetic Operators
➢ Increment Decrement Operators
➢ Relational Operator
➢ Logical Operators
➢ Bitwise Operators
➢ Assignment Operators
➢ Misc Operators
Program :
#include <stdio.h>
int main() {
int i,j,sum;
sum = i+j;
printf("Total is : %d",sum);
getch();
return 0;
}
OUTPUT
Program
#include <stdio.h>
int main() {
int i = 1;
i++;
printf("Value of i is : %d",i);
getch();
return 0;
}
OUTPUT
#include<stdio.h>
#include<conio.h>
void main(){
checkValue = i>j;
getch();
}
OUTPUT :
#include <stdio.h>
#include <conio.h>
void main(){
int number=50;
getch();
}
OUTPUT
FORMAT SPECIFIER IN C
In C programming we need lots of format specifier to
work with various data types.