πŸ“Š C++
Q. What is the output of the following C++ code?
Code:
#include <iostream> 
using namespace std; 
int main() 
{ 
    char arr[4] = "abcd"; 
    cout << arr;     
    return 0; 
}
  • (A) abcd
  • (B) Warning
  • (C) Error: the string in the array is too long.
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) Error: the string in the array is too long.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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