What is the output of following program ?
int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
}
Answer Posted / qint
5 20 1
Is This Answer Correct ? | 72 Yes | 6 No |
Post New Answer View All Answers
What is the use of volatile?
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.
What is the use of ?: Operator?
How can I remove the leading spaces from a string?
Is file a keyword in c?
Between macros and functions,which is better to use and why?
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
What is the scope of static variable in c?
How can I handle floating-point exceptions gracefully?
Is there any data type in c with variable size?
while initialization of array why we use a[][2] why not a[2][]...?
How do you generate random numbers in C?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What is pointer and structure in c?
What is the purpose of sprintf() function?