Examveda

What will be the output of the following C++ code?
#include <iostream> 
#include <string>
#include <cstring>
using namespace std; 
int main(int argc, char const *argv[])
{
	const char *a = "Hello\0World";
	cout<<a;
	return 0;
}

A. Hello World

B. Hello

C. World

D. Error

Answer: Option B


Join The Discussion

Related Questions on Classes and Objects in C plus plus