Saturday 17th April 2021
REGISTRATION
Online Fashion Store

CBSE Computer Science - Revision Tour(Solved)

CBSE Guess > eBooks > Class XII > CBSE Computer Science Pointer Solved Revision Tour By Mr. Ravi Kiran

COMPUTER SCIENCE POINTER

Previous Index Next

2007 Delhi:

1.d) Find the output of the following program:

#include<iostream.h>
void main( )
{ int Array[]={4,6,10,12};
int *pointer=Array;
for(int I=1;I<=3;I++)
{ cout<<*pointer<<”#”;
pointer++;
}
cout<<endl;
for(I=1;I<=4;I++)
{ (*pointer)*=3;
--pointer;
}
for(I=1;I<5;I++)
cout<<Array[I-1]<<”@”;
cout<<endl;
}

2


 

2007 Outside Delhi:

1.d) Find the output of the following program:

#include<iostream.h>
void main( )
{ int Numbers[]={2,4,8,10};
int *ptr=Numbers;
for(int C=1;C<3;C++)
{ cout<<*ptr<<”@”;
ptr++;
}
cout<<endl;
for(C=0;C<4;C++)
{ (*ptr)*=2;
--ptr;
}
for(C=0;C<4;C++)
cout<<Numbers[C]<<”#”;
cout<<endl; }

2

Previous Index Next

CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( [email protected] )