C++ Program to use comma operator in place of semi-colon


In this Program, You will learn How to use comma operator in place of semi-colon in C++.


Use Comma Operator

cout << "Welcome in C++ World",

cout << "\nWelcome Back Again";


Example: How to use comma operator in place of semi-colon in C++

Run it Now
#include<iostream>
using namespace std;

int main() {

    cout << "Welcome in C++ World",

    cout << "\nWelcome Back Again";

    return 0;
}

Output:

Welcome in C++ World
Welcome Back Again