Saturday, 3 April 2021

Array in C++

 #include<stdio.h>

#include<iostream.h>

#include<conio.h>

main()

{

clrscr();

int A[5]={5,8,6,9,2};

int i;

for(i=0;i<5;i++)

{

cout<<A[i]<<endl;

}

cout<<"Base Address="<<A<<endl;

for(i=0;i<5;i++)

{

cout<<&A[i]<<endl;

}

getch();

return 0;

}

No comments:

Post a Comment