TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Friday 22 May 2020

Structure Of C++ Programming Language | Structure Of C++ Programming Language Example | Structure Of C++ Programming Language In Hindi

Structure of  C++ Program


Structure of c program will explain the step of c program in how many step a program will developed so there are the step:-

1.    Comment Line

2.    Header file declaration

3.    Main function

4.    Opening barse

5.    Body of program

6.    Closing barse

 

·       /* Comments */

Comments are a way of explaining what makes a program. The compiler ignores comments and used by others to understand the code.


·       #include<stdio.h>      

     #include is a specific preprocessor command that effectively copies and pastes  the entire text of the file, specified between the angle brackets, into the source code.

  The file  iostream which is a standard file that should come with the C++   compiler, is short for input-output streams. This command contains code for displaying and getting an input from the user.

iostream file defines two names used in this program - cout and endl.

 

·       int/void main()  

int/void is a return value, which will be explained in a while.


·       main()       

The main() is the main function where program execution begins. Every C program must contain only one main function. Or This is the main function, which is the default entry point for every C program and the void in front of it indicates that it does not return a value.

 

 

·       Braces                                                

Two curly brackets "{...}" are used to group all statements. Or Curly braces which shows how much the main() function has its scope.

·       Cout<<     

    The name cout  is short for character output and displays whatever is between the << brackets.

Symbols such as << can also behave like functions and are used with the keyword cout.

   

Example:

/* write a program to print hello */

#include<iostream.h>

#include<conio.h>

void main()

{

Cout<<“hello sir welcome to today class of c”;

getch();

}

Output:

Hello sir welcome to today class of c

 

image of structure of c++

Fig: Structure of c++


No comments:

Post a Comment