HOME C C++ PYTHON JAVA HTML CSS JAVASCRIPT BOOTSTRAP JQUERY REACT PHP SQL AJAX JSON DATA SCIENCE AI

C++ Syntax

Definition:

Syntax refers to the rules and regulations for writing statements in a programming language.They can also be viewed as the grammatical rules defining the structure of a programming language.

Structure of C++:


Example:


    #include<iostream>
    using namespace std;
    int main(){
      int num1=24;
      int num2=34;
      int result=num1+num2;
      cout<<result<<endl;
      return 0;
    }
    

Output