C++ is one of the most versatile languages in the world. It is used nearly everywhere for everything… systems programming (operating systems, device drivers, database engines, embedded, Internet of Things, etc.)

Enter Header Image Headline Here

Wednesday 5 April 2017

C++ Program Structure

                                C++ Program  Structure


Structure of C++ Program : Layout of C++ Program  :

C++ programming language is most popular language after C programming language.
C++ is first object orianted Programming language. We have summarize of C++ program inthe following Picture  - 

                                                                 Structure of C++ Program

Section 1 : Header File Declaration Section :

  • Header files used in the program are listed here.
  • Header file provides Prototype declaration for different library Functions.
  • We can also include User Define Header File.
  • Basically all preprocessor directives are written in this section.

Section 2 : Global Declaration Section :

  1. Global Variables are declared here.
  2. Global Declaration may include - 
  •  Declaring Structure
  •  Declaring Class
  •  Declaring Variable

Section 3: Class Declaration Section :

  • Actually this section can be considered  as sub section for the global declaration section.
  • Class declaration and all method of that class are defined here.

Section 4 : Main Function  :

  • Each and every C++ program always starts with main fuction.
  • This is entry point for all the function, Each and every method is called indirectly through main.
  • We can created class objects in the main.
  • Operating system call this function automatically.

Section 5 : Method Defination section :

  • This is optional section, Generally this method was used in C Programming







0 comments:

Post a Comment

Popular Posts

Recent Posts

Categories

Unordered List

Text Widget