Can i use Two or More Main Funtion in any C program.?

Answers were Sorted based on User's Feedback



Can i use Two or More Main Funtion in any C program.?..

Answer / vadivelt

Main fuction can be called from a main function of same
prototype(recursive call). But multiple definition of a
main function is not possible.

Is This Answer Correct ?    12 Yes 1 No

Can i use Two or More Main Funtion in any C program.?..

Answer / madhu cherukuri

always the c program starts from main function only.if we
will write two main functions then it is confusion to complier.
one more import point the main function it self can not
executed one more internal function i.e start function
called the main function then main starts execution.

Is This Answer Correct ?    7 Yes 0 No

Can i use Two or More Main Funtion in any C program.?..

Answer / shirad

There cannot be two functions with same name or else there
will be error in build process stating "redefinition"

Is This Answer Correct ?    3 Yes 1 No

Can i use Two or More Main Funtion in any C program.?..

Answer / manjunath m

There cannot be two functions with same name or else there
will be error in build process stating "redefinition"

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.

0 Answers   HCL,


All technical questions

0 Answers   TCS,


why Language C is plateform dependent

3 Answers   Siemens, Wipro,


Is it acceptable to declare/define a variable in a c header?

0 Answers  


Which of these statements are false w.r.t File Functions? i)fputs() ii)fdopen() iii)fgetpos() iv)ferror() A)ii B)i,ii C)iii D)iv

6 Answers   Accenture,






What is getch() function?

0 Answers  


How can we open a file in Binary mode and Text mode?what is the difference?

1 Answers   PanTerra,


What is bin sh c?

0 Answers  


In a switch statement, explain what will happen if a break statement is omitted?

0 Answers  


How arrays can be passed to a user defined function

0 Answers  


There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take turns to remove these eggs from the baskets. On each turn, a player must remove at least one egg, and may remove any number of eggs provided they all belong to the same basket. The player picking the last egg(s) wins the game. If you are allowed to decide who is going to start first, what mathematical function would you use to decide so that you end up on the winning side? Upload a C program to demonstrate the behaviour of the game.

2 Answers  


Is fortran still used today?

0 Answers  


Categories