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

What are the advantages of external class?

1 Answers  


Write a function in c to find the area of a triangle whose length of three sides is given.

2 Answers  


how could explain about job profile

1 Answers  


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1 Answers  


1)which of following operator can't be overloaded. a)== b)++ c)?! d)<=

16 Answers   CybOrg, Siemens,


Explain About fork()?

1 Answers   TISL,


How to convert decimal to binary in C using recursion??

4 Answers   HP, IBM,


a 'c' program to tell that the set of three coordinates lie on a same line

3 Answers   Persistent,


What is meant by initialization and how we initialize a variable?

1 Answers  


WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

1 Answers  


in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?

11 Answers   IBM,


What is a stream?

1 Answers  


Categories