What will be the output of the following C++ code?
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main()
{
string s('a');
cout<<s;
return 0;
}
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main()
{
string s('a');
cout<<s;
return 0;
}
A. a
B. empty string
C. Error
D. Segmentation fault
Answer: Option C
Join The Discussion