Answers for "what does endl do in c++"

C++
3

C++ and endl

// endl example
#include <iostream>     // std::cout, std::end
using namespace std;
int main () {

  int a=100;
  double b=3.14;

  cout << a;
  cout << endl;              // manipulator inserted alone
  cout << b << endl << a*b;  // manipulator in concatenated insertion
  endl (cout);               // endl called as a regular function

  return 0;
}
Posted by: Guest on April-03-2020
1

c++ endl

cout << "Hello " << 'n'<<"world";
cout << "Hello " << endl<<"world";
//Hello  
//world
Posted by: Guest on April-08-2021

Browse Popular Code Answers by Language