Lecture 6 C++ Datatype
Lecture 6 C++ Datatype
Programming Fundamentals
Data types
int age;
2 \b
Inserts a backspace in the text at this point.
3 \n
Inserts a newline in the text at this point.
4 \r
Inserts a carriage return in the text at this point.
5 \f
Inserts a form feed in the text at this point.
6 \’
Inserts a single quote character in the text at this point.
7 \”
Inserts a double quote character in the text at this point.
8 \\
Inserts a backslash character in the text at this point.
Size of char : 1
Size of int : 4
Size of short int : 2
Size of long int : 4
Size of float : 4
Size of double : 8
Size of wchar_t : 4
char a=‘A’;
}
char a=‘A’;
cout<< a;
}
char a=‘/n’;
cout<< a;
}
char a=64;
cout<< a;
}
There can be many types of operations like arithmetic, logical, bitwise etc.
There are following types of operators to perform different types of
operations in C language.
• Arithmetic Operators
• Relational Operators
• Logical Operators
• Bitwise Operators
• Assignment Operator
• Unary operator
• Ternary or Conditional Operator
• Misc Operator