- 2
What is the output of the following program segment?
(A program segment means part of a program.) int s = 100; cout << s; cout << âsâ ;
1 Answer
+ 6
Its output is:
100s
This is because when you written s, whose assigned value is 100, the output is its value is 100. But when you write "s" it is considered as just a string written by programmer to display as it is to the user.