Â
In this, we are going to see what is the use of 'endl' keyword in a C++ program.
The Code given below can be used in Turbo C++ Compiler.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
// 'endl' is used to end the line i.e. end of line
cout<<"Helpforcoders"<<endl;
cout<<"Welcomes you";
getch();
}
The Code given below can be used in g++/gcc Compiler.
#include<iostream>
using namespace std;
int main()
{
// 'endl' is used to end the line i.e. end of line
cout<<"Helpforcoders"<<endl;
cout<<"Welcomes you";
return 0;
}
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP