Output writing – Pointer to array
2
Find and write the output of the following C++ program code:
Note : Assume all required header files are already included in the program.
#define Modify(N) N*3+10 void main() { int LIST[]={10,15,12,17}; int *P=LIST, C; for(C=3; C>=0; C--) LIST[I]=Modify(LIST[I]); for (C=0; C<=3; C++) { cout<<*P<<":"; P++; } }
CBSE12A-2018