answersLogoWhite

0


Best Answer

Basic structure of a C program is /* Documentation section */ /* Link section */ /* Definition section */ /* Global declaretion section */ /* Function section */ (return type) (function name) (arguments...) void main()

{

Declaration part Executable part (statements)

} /* Sub-program section */ (return type) (function name 1) (arguments...) (return type) (function name 2) (arguments...) .

.

. (return type) (function name n) (arguments...) Basic structure of a C program is /* Documentation section */ /* Link section */ /* Definition section */ /* Global declaretion section */ /* Function section */ (return type) (function name) (arguments...) void main()

{

Declaration part Executable part (statements)

} /* Sub-program section */ (return type) (function name 1) (arguments...) (return type) (function name 2) (arguments...) .

.

. (return type) (function name n) (arguments...)

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

<Include header file section>

Global declaration section

/*Comments*/

function name main()

{

/*comments*/

Local declaration section;

Executable section;

User defined functions

{

______________

______________

______________

}

}

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

Something like this:

program -> <empty>

program -> type-definition program

program -> type-declaration program

program -> variable-definition program

program -> variable-declaration program

program -> function-definition program

program -> function-declaration program

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

The format of a C program:-

[Constant Declarations]

[External Variable Declarations]

void main()

{

[variable declarations]

[program statements]

}

[additional functions]

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

#include<stdio.h> main()

{

exe stat1;

exe stat2;

.

.

.

}

where

# is pre processsor directive

main() program starts execution from this point

void main() function can also be used where it returns no value.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

A simple C program usually begins with the #include preprocessor directives that direct the inclusion of certain header files containing standard functions used for I/O (for example, scanf() and printf() present in <stdio.h> are used for console input and output respectively).

It also contains one or more functions (one of which must be main()). The main() function is where program execution begins and terminates.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

discuss the structure of c program with suitable example.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

return-type function-name(parameter-type parameter-name, etc.) { ...code... }

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Explain the structure of c program with an suitable example?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Example of data program dependency in file system?

-File structure is defined in the program code.


Explain the following tearm in the context of object oriented programming Also explain how these concept are implement in c by given an example program for each?

Explain the following terms in the context of object oriented programming. Also explain how these concepts are implemented in C++ by giving an example program for each.


Explain the PERT model with the suitable example?

PERT Stands for program evaluation and review technique. It is a tool used to organize, schedule and coordinate tasks. For example task B needs A to be completed and also Task B and C can be done parallel. These things can be easily managed by PERT tool


What is constant explain their storage representation with suitable example?

A constant is a variable that is immutable. The storage representation is exactly the same as for any other variable of the same type, the only difference is that all constants are allocated in the program's data segment (static memory).


What is persistence in oops explain with example?

The phenomenon where the object outlives the program execution time &amp; exists between execution of a program is known as persistance


Explain the design and application of arrays and how an array simplifies program development?

I need an example of a real-world array


Explain the concept of program and project hierarchies with examples?

explain the concepts of program and project hierarchies


When creating a computer program who is design the structure of the program in a computer system?

when creating a computer program, system analyst design the structure of the program


Explain the Abstraction terms in the context of object oriented programming Also explain how these concepts are implemented in C by giving an example program for each?

g terms in the context of object oriented programming


What is the collective noun for entertainment?

There is no specific collective noun for the noun entertainment, in which case a noun suitable for the situation is used; for example a venue of entertainments, a program of entertainments, etc.


Can you explain the program of Fibonacci series in c?

You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?


What the structure of a COBOL program?

spaghetti