Basic Concepts of C++(syntax)

 Basic Concept + Syntax of C++ Programming

  1. #include <iostream.h>  
  2. #include<conio.h>  
  3. Return-type main() {  
  4.    //Code;
}  #include<iostream>, indicates same behaviour like #include<stdio.h> which means its include standard input-output libarary function. This help in cin and cout methods for reading from input and writing to output respectively.


#include <conio.h> includes the console input output library functions. The getch() function is defined in conio.h file.


Return-type indicates int, void types as we seen in our 1st program. i.e int main(), void main()
                      void mean fuction does not return any value.

Main():-The main() function is the entry point of every program in C++ language. 

Curly braces { }:- Curly braces (also referred to as just "braces" or as "curly brackets") are a major part of the C++ programming language. They are used in several different constructs, outlined below, and this can sometimes be confusing for beginners. An opening curly brace { must always be followed by a closing curly brace }.


//code  it mean inside curly braces{} we write our code for e.g cout<<"Hello-World"<<endl;
              cin>> It mean it take input data from user.
              cout<< It display the data on the screen.
              endl;   It help in break the line in program, it usually use in cout<<.
              \n;      It is similar to endl;
              \t;      It is used to given spaces.

getch() The getch() function asks for a single character. Until you press any key, it blocks the screen. 

Comments

Popular posts from this blog

C++ Tutorial

My Social Media Account