C++ Revision Tour > Computer Science - Class 12
1. Find the output of the following program:
#include <iostream.h>
#include <conio.h>
void change(int arr[],int count)
{
for(int c=0; c <count ;c++)
arr[c]=arr[count-c-1];
}
void main()
{
clrscr();
int a[]={1,2,3},b[]={20,30,40,50},c[]={100,200};
change(a,3);
change(b,4);
change(c,2);
for(int l=0;l<3;l++)cout<<a[l]++<<'#';
cout<<endl;
for(l=0;l<4;l++)cout<<b[l]++<<'#';
cout<<endl;
for(l=0;l<2;l++)cout<<c[l]++<<'#';
getch();
}
OUTPUT :
3#2#3#
50#40#40#50#
200#200#
3#2#3#
50#40#40#50#
200#200#