COMPUTER PROGRAMMING FUNDAMENTALS
5 BASIC ELEMENTS OF PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
start()
|
|
system()
|
|
main()
|
|
program()
|
Detailed explanation-1: -C programs are structured from ‘functions’. Every program must have at least one function, called ‘main’. Program execution starts with this function and the program is contained within it. Apart from the main function, functions are in some ways similar to Assembler subroutines.
Detailed explanation-2: -Every C program has a primary function that must be named main . The main function serves as the starting point for program execution. It usually controls program execution by directing the calls to other functions in the program.
Detailed explanation-3: -main( ) is the only function that every C program must contain. When programmer run command to execute C Program the compiler of the C language search for main ( ) function. It is the function from where the execution of the program begins.
Detailed explanation-4: -The answer is yes. We can write program, that has no main() function. In many places, we have seen that the main() is the entry point of a program execution. Just from the programmers perspective this is true.
Detailed explanation-5: -c does not require a main() function.