-->

WAP to print multiple string using single cout.

//program to print multiple string using single cout object.
#include <iostream>// header file
using namespace std;//to handle all standard characters/functions,reserved words  used in program. we do not use in turboc++ compiler
int main()
{
    cout << "first line" << endl
        <<"second line"<<endl
        <<"third line"<<endl; //We have used only one cout .
                              //It is also called chaining concept. Keep in mind, put semi-colon at the last of statement.
    return 0;                   // otherwise it will not work.
}

No comments:

Post a Comment