Answer to Question #4721 in C++ for Nij

Question #4721
I really don't get the basics of writing a program like #include <iostream.h> like should we use space or not i just want ma basics to be strong so that i don't suffer in ma boards that is grade 12th.
Expert's answer
#include "iostream" // header file //<-- this is a single comments

/*& <-- multiply comments
iostream is a header file which is used for input/output in the C++ programming language.
It is part of the C++ standard library. The name stands for Input/Output Stream.
In C++ and its predecessor.
iostream uses the objects cin, cout, cerr, and clog for sending data to and from the standard streams input,
output, error (unbuffered), and error (buffered) respectively. As part of the C++ standard library, these objects are a
part of the std namespace.
using namespace std; // declaration namespace, this is standart namespace

int main()
int a;& // initialize new variable
cout<<"Input your age "; // output
cin>>a; //input
cout<<"Your age is "<<a<<endl; //output. endl takes on a new line
system("pause"); // this directive show you a programme result after finish
return 0;& // main function return 0 if all ok, and 1 if something mistakes

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!


No comments. Be the first!

Leave a comment

Ask Your question

New on Blog