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...)
<Include header file section>
Global declaration section
/*Comments*/
function name main()
{
/*comments*/
Local declaration section;
Executable section;
User defined functions
{
______________
______________
______________
}
}
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
The format of a C program:-
[Constant Declarations]
[External Variable Declarations]
void main()
{
[variable declarations]
[program statements]
}
[additional functions]
#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.
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.
discuss the structure of c program with suitable example.
return-type function-name(parameter-type parameter-name, etc.) { ...code... }
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.
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).
The phenomenon where the object outlives the program execution time & exists between execution of a program is known as persistance
I need an example of a real-world array
You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?
-File structure is defined in the program code.
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.
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
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).
The phenomenon where the object outlives the program execution time & exists between execution of a program is known as persistance
I need an example of a real-world array
explain the concepts of program and project hierarchies
when creating a computer program, system analyst design the structure of the program
g terms in the context of object oriented programming
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.
You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?
spaghetti