What is the output of following program ?
int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
}
Answer Posted / krishna deep sharma
4,4,1
coz we shift the bit as 5=101 now shift two bit to right as
101>>2=001
now
2<<001=100
noe x=4
printf execute from right to left so ans is 4,4,1
| Is This Answer Correct ? | 11 Yes | 28 No |
Post New Answer View All Answers
What does main () mean in c?
What are the functions to open and close file in c language?
Describe the difference between = and == symbols in c programming?
How can I change their mode to binary?
What does typeof return in c?
What are formal parameters?
Explain how do you declare an array that will hold more than 64kb of data?
how many key words availabel in c a) 28 b) 31 c) 32
Define VARIABLE?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
What is a program flowchart and explain how does it help in writing a program?
What are the different types of constants?
What are keywords c?
Explain how can a program be made to print the line number where an error occurs?
What is the difference between text files and binary files?