Wednesday 1 August 2012

Lecture 128


                                                Lecture 128

// Loop do while
#include <iostream>
#include <conio.h>
using namespace std;
 main ()
{  
   char name[10]="Shahid";
   int i; 
   cout<<"Name:  ";
   i=0;
   do
   {
       cout<<name[i];
       i++;
   }while(name[i] != '\0');   
  getch();
  return 0;
}

Code view in dev compiler:

Compile the program Ctrl+F9

      Run program Ctrl+F10