πŸ“Š C++
Q. What will be the output of the following C++ code?
Code:
#include <iostream> 
#include <string>
using namespace std; 
int main(int argc, char const *argv[])
{
	char s1[6] = "Hello";
	char s2[6] = "World";
	char s3[12] = s1 + " " + s2;
	cout<<s3;
	return 0;
}
  • (A) Hello
  • (B) World
  • (C) Error
  • (D) Hello World
πŸ’¬ Discuss
βœ… Correct Answer: (C) Error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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