Basics of c++
it is an object oriented programming language.
it was developed by jarney stroustrup at AT & T bell lab.
Comments in C++
Single Line Comment
It starts with a double slash symbol - //
// This is a single line comment in C ++
Multi Line Comment
It starts with /* and ends with /*
/* This is a
multi line comment
in C++ */
Output and Input Operator
Output Operator | Input Operator |
<< - Put to Operator | >> - Get to Operator |
cout<<“Hello World”; | cin>>name-of-function; |
cout<<“What is your name”; | cin>>your-name; |
Return Statement
In C++ main ( ) Function returns an integer type value to the operating system. Therefore every main ( ) in C++ should end with a return (0) statement, otherwise a warning or an error might occur.
Structure of a Program
#include<iostream>
using namespace std;
int main()
{
cout<<"Hello, World";
return 0;
}