πŸ“Š C++
Q. What will be the output of the following C++ code?
Code:
#include<iostream>
using namespace std;
int main ()
{
   int cin;
   cin >> cin;
   cout << "cin: " << cin;
   return 0;
}
  • (A) Nothing is printed
  • (B) Segmentation fault
  • (C) cin: garbage value
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (C) cin: garbage value

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
178
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Babita
Publisher
πŸ“ˆ
92%
Success Rate