Main must be written as
a.the first function in the program
b.Second function in the program
c.Last function in the program
d.any where in the program

Answer Posted / iftekhar qurashi

last function in the program to avoid prototyping.
if we write it as a first function and other functions is declared after main(), then main function can't find it.

but it can be declared anywhere in the program when we declared every function except main() in the beginning of program

for other consultancy you can mail me

regards
iftekhar qurashi

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is nested structure?

576


List some of the dynamic data structures in C?

791


Can we declare a function inside a function in c?

590


What does c mean?

589


What does the error 'Null Pointer Assignment' mean and what causes this error?

743






The difference between printf and fprintf is ?

720


Explain how can you check to see whether a symbol is defined?

664


How many types of functions are there in c?

586


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

604


What are the differences between Structures and Arrays?

612


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

637


Explain how can a program be made to print the line number where an error occurs?

694


What are pragmas and what are they good for?

578


please explain every phase in the "SDLC" in the dotnet.

2180


What are 3 types of structures?

594