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 |
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Why use int main instead of void main?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What are the advantages of union?
How can my program discover the complete pathname to the executable from which it was invoked?
What is the use of sizeof?
Is it valid to address one element beyond the end of an array?
can we print any string without using terminator?
What are two dimensional arrays alternatively called as?
write a program to swap bits in a character and return the value prototype of function char fun (char a, charb flag c) where fun returns a char, char a is a the value char b is the bit to be changed and flag c is the bit value for eg: x=fun(45,7,0) since 45 is 0010 0101 and ow x should contain the value 65 (0110 0101)
1 Answers Bosch, College School Exams Tests,
How to reverse a linked list
1 Answers Aricent, Fidelity, IBM, TCS,
What has to put when we are inserting as assembly language code into the C code? or When we are inserting as assembly language code into the C code we have to insert one thing at the start and of the assembly language. What are they?