Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C Programming
»
Bitwise Operators
What will be the output of the program? #include<stdio.h> int main() { printf("%d %d\n", 32<<1, 32<<0); printf("%d %d\n", 32<<-1, 32<<-0); printf("%d %d\n", 32>>1, 32>>0); printf("%d %d\n", 32>>-1, 32>>-0); return 0; }
Garbage values
64 32 0 32 16 32 0 32
All zeros
8 0 0 0 32 0 0 16
Show Answer
Correct Answer:
64 32 0 32 16 32 0 32
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment