-
What is the output of the following program?
#include
using namespace std;
int main()
{
int p = 10;
float q;
cout << sizeof(++p + q);
cout << " "< return 0;
}
-
- 10 2
- 10 4
- 2 10
- 10 0
- 4 10
Correct Option: E
The a as a integer will be converted to float while calculating the size. The value of any variable doesn’t modify inside sizeof operator. Hence value of variable a will remain 10.