how to create c progarm without void main()?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Which driver is a pure java driver

996


write a program in c language to print your bio-data on the screen by using functions.

6255


Write a program to print factorial of given number using recursion?

607


Explain the advantages of using macro in c language?

584


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

2686






Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

632


Explain heap and queue.

591


How to establish connection with oracle database software from c language?

1679


Write a program of advanced Fibonacci series.

711


What is the code for 3 questions and answer check in VisualBasic.Net?

1696


How can I discover how many arguments a function was actually called with?

637


What is an auto keyword in c?

645


What are the header files used in c language?

591


What are the salient features of c languages?

627


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

1602