Predict the output.
int a; .
float b; . a = 5;
cout << sizeof(a + b/2);
Answered Feb 05, 2023
Output is 4. Result will be the memory size of floating point number
Output: i. 125 ii. 2 OR i. power(): It returns the value of a number raised to the power of another number. For example: Select power(5,3); Output: 125 ii. mod(): It returns the remainder of a number divided...
The output is a string “83”; String addition means concatenation.
It displays a message box with character ‘E’ from the fifth (4 + 1) place
(b) type casting (explicit conversion);
There is no problem and it is valid since 9 is a character. Any symbol from the key board is treated as a character.
Output is 12. In this statement first it take the value of k in 5 then increment it K++. So first operand for + is 5. Then it becomes 6....
1. 15 2. 16
2.5 The integer x is converted to float hence the result.
Conditional operator (?:)
a = -4, b = 2 and c = 1
Install the Bissoy app to consult with a doctor.
Log in to ask questions, provide answers, or leave comments.