Arrays - Find Output of Program :: Discussion


7.What will be the output of the program if the array begins at address 65486?
A.65486, 65488
B.65486, 65486
C.65486, 65490
D.65486, 65487
Answer:  Option  B
Explanation:

Step 1int arr[] = {12, 14, 15, 23, 45}; The variable arr is declared as an integer array and initialized.

Step 2printf("%u, %u\n", arr, &arr); Here,

The base address of the array is 65486.

=> arr, &arr is pointing to the base address of the array arr.

Hence the output of the program is 65486, 65486

Tutorial Link:
Published by:Michael Daani

Comments are not available

Post your comments here:

Optional

Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers