What is the basic syntax of C++?

Basic Syntax of C++

It's not hard to understand by breaking up the following code:

Example

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


The parts of the program: 

  1. #include<iostream> is the header where this program needed. Otherwise, the C++ programming language defines many headers, which contain information that is either Important or useful to your program.  
  2. using namespace std; tells the program compiler to use the line namespace std; Namespaces are a recent connection to the addition of C++.  
  3.  //main() is where the program starts execution.  
  4.  int main() is the main function where the program starts execution.  
  5.  cout << "Hello World!"; bring the message 'Hello World!' to display on the device's screen. and
  6.  return 0; is to terminate the main() function and return the value 0 to the calling process.

c syntax
Learn more about C++, click here to view  the table contents

Comments

Popular posts from this blog

Two ways to add code block in blogger template for composing posts

How to download and install Cambridge Advanced Learner's Dictionary_Fourth Edition-CALD4

αž—ាសាαž€αž˜្មវិαž’ី C++៖ ថេរ