πŸ“Š C++
Q. What is the output of the following C++ code?
Code:
#include <iostream>
using namespace std;
int main()
{
  int x = 2, v;
  void *p = &x;
  double y = 3;
  p = &y;
  v = x + y;
  cout << v << ', ' << p;
  return 0;
}
  • (A) Display 5
  • (B) Display 5, then the memory address
  • (C) Displays the memory address
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) Display 5, then the memory address

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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