how to create c progarm without void main()?



how to create c progarm without void main()?..

Answer / surya bhagavan s

#include<stdio.h>
#include <unistd.h>

_start()
{
_exit(my_main());
}

int my_main(void)
{
printf("Hello\n");
return 42;
}

for compilation

gcc -o3 -nostartfiles example.c

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More C Interview Questions

main() { int i; printf("%d",i^i); }

1 Answers  


how to print "hai" in c?

13 Answers   TCS,


Is there any data type in c with variable size?

0 Answers  


what is the use of a array in c

6 Answers  


Identify the operators that is not used with pointer a. && b. # c. * d. >>

2 Answers  






while running a program, i got the msg that press return key to exit.what that mean in C as there are no such options as far i know.

1 Answers   TCS,


Why isn't any of this standardized in c? Any real program has to do some of these things.

0 Answers  


What is a class?

3 Answers  


Can you pass an entire structure to functions?

0 Answers  


about c language

0 Answers  


helllo sir give me some information of the basic information the c as printf ,scanf , %d ,%f and why is the main use of these.

3 Answers  


What is the memory allocated by the following definition ? int (*x)[10];

4 Answers   ADITI, Wipro,


Categories