Q. What is the output of the following code in C++?

Code:
#include <iostream>
using namespace std;
int main()
{
  int a = 4;
  float b;
  cout << sizeof(++a + b) << endl;
  cout << a;
  return 0;
}
  • (A) 5 4
  • (B) 4 5
  • (C) 4 4
  • (D) 2 4
πŸ’¬ Discuss
βœ… Correct Answer: (C) 4 4

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
261
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
98%
Success Rate