Examveda

What will be the output of the following C++ code?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
  string str ("example.");
  str.front() = 'E';
  cout << str << endl;
  return 0;
}

A. Example

B. Example.

C. example

D. example.

Answer: Option B


Join The Discussion

Related Questions on Classes and Objects in C plus plus