welcome to all
PROGRAMMING
IN C++
OOPS CONCEPT
TOKENS
EXPRESSION
CONTROL STRUCTURE
IF Example of if:
#include <iostream>
using namespace std;
int main()
{
int a = 15, b = 20;
if (b > a)
{
cout << "b is greater" <<
endl;
}
system("PAUSE");
}
Output:
b is greater
IF ELSE Example of if else:
#include <iostream> using
namespace std;
int main()
{
int a = 10, b = 15;
if (b > a)
{ cout << "b is greater" <<
endl;
}
else
{ cout << "a is greater" <<
endl; }
system("PAUSE");
}
Output:
b is greater
SWITCH
Example of switch:
#include <iostream>
using namespace std; main()
{
int a;
cout << "Please enter a no between 1 and 3: " <<
endl;
cin >> a;
switch(a)
{
case 1: cout << "You chose One" << endl;
break;
case 2: cout << "You chose Two" << endl;
break;
case 3: cout << "You chose Three" << endl;
break; default : cout << "Invalid Choice. Enter a no
between 1 and 3" << endl; break;
}
system("PAUSE");
}
Output:
Please enter a no between 1 and 3..
DO WHILE
Example of do while:
#include <iostream>
using namespace std;
int main ()
{
/* local variable Initialization */
int n = 1,times=0;
/* do-while loops execution */
Do
{ cout << "C++ do while loops: " <<
n <<endl;
n++;
}
while( n <= times ); return 0;
}
Output:
C++ do while loops: 1
WHILE
Example of while:
#include <iostream>
using namespace std;
int main ()
{
/* local variable Initialization */
int n = 1,times=5
/* while loops execution */
while( n <= times )
{
cout << "C++ while loops: " << n <<endl;
n++;
}
return 0;
}
Output:
C++ while loops: 1
C++ while loops: 2
C++ while loops: 3
FOR LOOP
Example of for:
#include <iostream> using
namespace std;
int main ()
{
/* local variable Initialization */
int n = 1,times=3;
/* for loops execution */ for( n = 1; n
<= times; n = n + 1 )
{
cout << "C++ for loops: " << n
<<endl;
}
return 0;
}
Output:
C++for loops: 1
C++ for loops: 2
C++ forloops: 3
FUNCTION IN C++
CLASS AND OBJECTS
CONSTRUCTOR AND
DESTRUCTOR
OPERATOR OVERLOADING
TYPE CONVERSION
INHERITANCE
TYPES OF INHERITANCE
POINTER
POLYMORPHISM
FUNCTION OVERLOADING
VIRTUAL FUNCTION
MANAGING CONSOLE I/O
FUNCTION
WORKING WITH FILES
TEMPLATE
EXCEPTION HANDLING
MANIPULATION STRING
OOPS DEVELOPMENT
THANKING YOU

3 rd animation