Basic Stucture

Basic Stucture

Sample C++ program

#include <iostream>
using namespace std;
int main() {
    cout << "Hello World!!";
    return 0;
}  

#include <iostream> : iostream is a inbuilt header library which allows you to deal with input and output objects like cout etc.

using namespace std : The above line means that the object and variable names can be used from standard library.

cout : cout is used to print the output.

main() : main function is the entry point of any C++ program.

return 0 : To end the main function

No comments:

Post a Comment

Introduction

  C++ C++ is a general purpose programming language that was develop as an enhancement of the C language to include object-oriented concept....