Q. What is the output of the following C++ program?

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

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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