Arrays - Find Output of Program :: Discussion


6.What will be the output of the program?
A.1
B.10
C.0
D.6
Answer:  Option  B
Explanation:

Step 1int arr[1]={10}; The variable arr[1] is declared as an integer array with size '2' and it's first element is initialized to value '10'(means arr[0]=10)

Step 2printf("%d\n", 0[arr]); It prints the first element value of the variable arr.

Hence the output of the program is 10.

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