Probably the best way to start learning a programming language is by writing a program. Therefore, here is our first program:
#include<iostream.h>
int main()
{
.........;
return 0;
}
#include<iostream.h>
//main() is where program execution begins.
int main()
{
cout << "This is my first C++ Program!";
return 0;
}
#include<iostream.h>
header is needed. this header file is included for Standard I/O (input output) function.int main()
is the main function where program execution begins.cout << "This is my first C++ program!";
causes the message "This is my first C++ program" to be displayed on the screen.return 0;
terminates main() function and causes it to return the value 0 to the calling process.
Ask Question