Pages

Tuesday, January 26, 2016

Data Type

Data Type Used In C++

long double Highest
double
float
long
int
short
char Lowest

Escape Sequence

Escape Sequence used in c++

\ n             Newline
\ r              Return
\ t              Tab
\ \              Backslash
\ ‘             Single quotation mark
\ “            Double quotation marks
\ xdd        Hexadecimal notation

A Program that sum two digit


#include<iostream>
#include<conio.h>
using namespace std;
main()
{
int a,b,sum;                         //three variable of integer type
a=10;           
b=20;
sum=a+b;                            //sum=a+b it sum a and b values
cout<<"The sum of two digit is="<<sum<<endl;
                                                                            //cout show result
getch();               //getch is used to stay on screen while we can not press any key.

}

Monday, January 25, 2016

First Program in C++



  1  // an example to observe using statement
  2  // program to display greeting
  3  #include <iostream.h>
  4 
  5  int main()
  6  {
  7     cout << “Hello world\n";
  8 
  9     return 0;      // indicate that program ended successfully
  10  }


Out Put 

Hello World




..
..