Const - Find Output of Program :: Discussion


9.What will be the output of the program?
A.Error
B.-11, 34
C.11, 34
D.None of above
Answer:  Option  B
Explanation:

Step 1const c = -11; The constant variable 'c' is declared and initialized to value "-11".

Step 2const int d = 34; The constant variable 'd' is declared as an integer and initialized to value '34'.

Step 3printf("%d, %d\n", c, d); The value of the variable 'c' and 'd' are printed.

Hence the output of the program is -11, 34

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