Execution of C++ program
• COMPILATION= codes are converted into assembly language instruction and saved with (.s) extension
• ASSEMBLY= convert the assembly language instructions into machine level instruction so that our cpu can understand
• LINKING = all the ( assembly instruction ,machine level instruction and all the files ) get together in the process of linking to execute the code
First program...
using namespace std;
int main()
{
cout<<"Welcome to the upcoming programer page :)";
return 0;
}
C++ Comments
comments are the line of statement which is ignored by the compiler while executing the source code .
Example..
using namespace std;
int main()
{
cout<<"Welcome to the upcoming programer page :)"; // print welcome to the upcoming programer page
return 0;
}
The compiler will ignore the line / sentence ( print welcome to the upcoming programer page)
How to implement a comment
/* This is a comment */
/* C++ comments can also
be of multiple lines
*/
// single line comment
Download all my written source code..
Data Type
| Data Types | Memory Size | Range |
|---|---|---|
| char | 1 byte | -128 to 127 |
| signed char | 1 byte | -128 to 127 |
| unsigned char | 1 byte | 0 to 127 |
| short | 2 byte | -32,768 to 32,767 |
| signed short | 2 byte | -32,768 to 32,767 |
| unsigned short | 2 byte | 0 to 32,767 |
| int | 2 byte | -32,768 to 32,767 |
| signed int | 2 byte | -32,768 to 32,767 |
| unsigned int | 2 byte | 0 to 32,767 |
| short int | 2 byte | -32,768 to 32,767 |
| signed short int | 2 byte | -32,768 to 32,767 |
| unsigned short int | 2 byte | 0 to 32,767 |
| long int | 4 byte | |
| signed long int | 4 byte | |
| unsigned long int | 4 byte | |
| float | 4 byte | |
| double | 8 byte | |
| long double | 10 byte |
HTML defines a long list of available inline tags, a complete list of which can be found on the Mozilla Developer Network.
Primitive data types & Non-primitive data types
Primitive data types - includes byte , short , int , long , float , double , boolean and char.
Non-primitive data types - such as String , Arrays and Classes