Basic Concepts of C++(syntax)
Basic Concept + Syntax of C++ Programming
- #include <iostream.h>
- #include<conio.h>
- Return-type main() {
- //Code;
#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
Post a Comment