Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute CPA-21-02 Exam - Topic 6 Question 63 Discussion

Posted by Gaston on Oct 31, 2026 at 12:24 AM

What is the output of the program?

#include

using namespace std;

int main()

{

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

tab[1]=10;

int *p;

p=&tab[0];

cout<<*p;

return 0;

}

Suggested Answer: A

Get Premium CPA-21-02 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
2 comments · newest first
RE
Remona 23 hours ago
I'm not entirely sure, but I remember something about how changing `tab[1]` to 10 shouldn't affect what `p` points to.
JA
Jade 6 days ago
I think the output should be 10 because `p` points to the first element of the array, which is `tab[0]`.
0/2000 characters

Save Cancel