Lecture 44
Array
Code:
#include <iostream>
#include <conio.h>
using namespace std;
main ()
{
int num[2]; //declaration
num[0]=22;
//Initialization
num[1]=23;
cout<<"First number : "<<num[0];
cout<<"Second number : "<<num[1];
getch();
return 0;
}
Code view in dev compiler:
Compile the program Ctrl+F9
Run program Ctrl+F10