Home » Ask & Discuss » Board Exams - CBSE, ICSE, State Boards » Computer Science « Back to Discussion
Computer Science
quick!!!quick!!!urgent!!!!!
None
give the output: # include < iostream.h> void main () { intArray[] = {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=l; I<5; I + + ) cout << Array [I-1] << ?@?; cout << endl; } plz quick!!!!!! rates will follow !!!!!!!!!!!!!
Comments (9)
ankita raisinghani
Cool goIITian

Joined: 22 Jan 2008
Posts: 85
30 Mar 2008 18:30:22 IST
Like
1 people liked this
see this is frm 2007 ppr
4#6#10
12@18@30@36
Reply
30 Mar 2008 19:00:24 IST
Like
1 people liked this
I think it is something like this...
int *pointer = Array ; ... this stores the address of the first element of the array in the pointer..
cout<<*pointer... would display the value of the array at the address stored in the array...
for (int I=1 ; I<=3 ; I++)
{
cout<<*pointer<<#?;
pointer ++;
}
cout<<endl;
..isse u'll get 4#6#10# and then next line...
(*pointer)*=3 means every value is now three times so 12,18,30 and 36
for(I=l; I<5; I + + )
cout << Array [I-1] << ?@?;
cout << endl;
...would give 12@18@30@36@
so output is
4#6#10#











