1.

a) What is the output of the following program?# include void main ( ) {int a;a = 5+3*5; cout << a; } b) How do 9, ‘9’ and “9” differ in C++ program?

Answer»

(a) Here multiplication operation has more priority than addition. 

hence a = 5 + 15 = 20 

(b) Here 

9 is an interger 

‘9’ is an character 

“9” is a string



Discussion

No Comment Found

Related InterviewSolutions