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
What is the use of a conditional inclusion statement in C?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
find the sum of two matrices and WAP for it.
What is the use of ?: Operator?
What are extern variables in c?
Why c is faster than c++?
What is the use of structure padding in c?
why programs in c are running with out #include
how to create duplicate link list using C???
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
What is difference between array and pointer in c?
What is integer constants?
What is exit() function?
Can you please explain the difference between exit() and _exit() function?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.