Teaching Rajasthan Basic Computer Instructor 2021 Mock Test Programming and Data Structure Programming in C Pointer
What will be the output of the following C++ program ?
#include
#include
void main( )
{
int num[ ] = {56, 75, 22, 18, 90};
int ∗ptr,i;
ptr = num;
ptr++;
ptr - = 1;
cout << "\nvalue at ptr: "<< ∗ptr;
}
1
74
2
56
3
55
4
75