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 is struct node in c?

0 Answers  


What is the o/p of the follow pgm? #include<stdio.h> main() { char char_arr[5]=”ORACL”; char c=’E’; prinf(“%s\n”,strcat(char_arr,c)); } a:oracle b. oracl c.e d.none

2 Answers   Oracle,


hi, which software companys will take,if d candidate's % is jst 55%?

0 Answers  


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

0 Answers  


#include<stdio.h> int f(int,int); int main() { printf("%d",f(20,1)); return 0; } int f(int n,int k) { if(n==0) return 0; else if(n%2)return f(n/2,2*k)+k; else return f(n/2,2*k)-k; } how this program is working and generating output as 9....?

1 Answers  


Find errors (1) m = ++a*5; (2) a = b ++ -c*2; (3)y = sqrt (1000);

5 Answers  


When should I declare a function?

0 Answers  


can we write a program in c for printf and scanf without using header file stdio.h

1 Answers  


What is spark map function?

0 Answers  


Do you know null pointer?

0 Answers  


A program to write a number of letters and numbers, such as counting and display

0 Answers  


What is the importance of c in your views?

0 Answers  


Categories