Answer to Question #283566 in C++ for Lucky

Question #283566

THE FOLLOWING TABLE SOME ESCAPE SEQUENCES ARE GIVEN. USE THESE ESCAPE SEQUENCE INTO THE FIRST.CPP




PROGRAM AND LIST THE OUTPUT.




First.cpp




#include <iostream> //this is preprocessor directive




using namespace std; //tells the compiler certain objects such as cout are contained




in the standard namespace (USED WITH DEV C++ COMPILER)




int main () //this is the main function




{




cout << "See mom! I wrote my first C++ program\n";




getchar(); //wait for the enter key to be pressed. Try the program without this line and write what you




have observed with or without this line..




return 0;




}

1
Expert's answer
2021-12-29T13:37:08-0500
#include<iostream>//this is preprocessor directive

using namespace std;//tells the compiler certain objects such as cout are contained
//in the standard namespace(USED WITH DEV C++ COMPILER)

int main()//this is the main function
{
	cout<<"See mom! I wrote my first C++ program\n";//output string of characters 
	getchar(); //with this operator the program waits
			   // for input character from user
	//getchar();without this operator the program ends 
	return 0;
} 

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog