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


Please Help Members By Posting Answers For Below Questions

What is the use of volatile?

608


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.

4840


What is the use of ?: Operator?

664


How can I remove the leading spaces from a string?

632


Is file a keyword in c?

500






Between macros and functions,which is better to use and why?

1567


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(); }

1857


What is the scope of static variable in c?

533


How can I handle floating-point exceptions gracefully?

632


Is there any data type in c with variable size?

630


while initialization of array why we use a[][2] why not a[2][]...?

1863


How do you generate random numbers in C?

654


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

822


What is pointer and structure in c?

569


What is the purpose of sprintf() function?

599