Skip to main content

Explain the basic structure of a C program.

Answer:





Capture.PNG




Documentation Section
Ø  It is set of Comment Line
Ø  It includes Title Of Program, Author Name
Ø  Data Used Or summary Information



Link Section
Ø  It is also called Header File Declaration Section
Ø  It Links Compiler to Link Functions From System Library

Definition Section
Ø  Defines Symbolic Constants
Ø  Eg. #define Count 10

Global Declaration Section
Ø  Variables that are accessed by one or more functions are called Global Variable
Ø  Global Variables are declared in this Section
Ø  Global VAriables are Always Declared outside of all Functions
Ø  Has Prototype Declaration Of C Functions
Ø  May Contain Function Definition

Main function Section
Ø  Used to start of actual C program
Ø  It includes two parts as declaration part and executable part
Variable declaration section: Used to declare private variable
Function declaration section: Used to declare functions of program from which we get required output.

Subprogram Section
Ø  It has all User-defined Functions that are called in main
Ø  User Defined Functions are generally placed immediately after main

Note:
Ø  Program Execution begins at Opening Brase
Ø  Program Execution ends at Closing Brase

Ø  All Statements in C must ends with Semicolon 

Popular posts from this blog

Draw the basic organization of computer

Answer:                 The basic organization of computer__ Input Unit: ·          It accepts (or reads) instructions and data from outside. ·          It converts these instructions and data in computer acceptable form ·          It supplies the converted instructions and data to the computer system for further processing. Central Processing Unit (CPU): Control Unit: Control unit of a computer system manages and coordinates the operations of all other components of the computer system. Arithmetic Logic Unit(ALU): Arithmetic logic unit of a computer system is the place, where the actual executions of instruction, takes place during processing operation. Storage Unit: Primary Memory: It is volatile ( loses data on power ...

Differences between positional and non-positional number system?

Answer: Positional Number System: In positional number system, there are only a few symbols called digits, and these symbols represent different values depending on the position they occupy in the number. The value of each digit in such a number is determined by three considerations__ 1.       The digit. 2.       The position of the digit in the number. 3.       The base of the number system.