What is the output of the program?

What is the output of the program?

#include <iostream>

using namespace std;

int main()

{

int tab[4]={10,20,30,40};

tab[1]=10;

int *p;

p=&tab[0];

cout<<*p;

return 0;

}
A . It prints: 10
B . It prints: 20
C . It prints: 11
D . It prints: 30

Answer: A

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments