Examveda

What will be the output of the following C++ code?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
    string name ("Jobs");
    string family ("Steve");
    name += " Apple ";
    name += family;
    name += '\n';
    cout << name;
    return 0;
 }

A. Steve Jobs

B. Apple

C. Jobs Apple Steve

D. Apple Steve

Answer: Option C


Join The Discussion

Related Questions on Arrays and Strings in C plus plus