main()
{
int a=5;
printf(?%d,%d,%d\n?,a,a< <2,a>>2);
}
Answer: 5,20,1 please explain this code in detail
Answer Posted / sathish
go through right shift & left shift operator function.
Ex: a<<2 = 5<<2 = 00000101(in binary)<<2 = 00010100(in
binary) = 20(in decimal)
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
How can I change their mode to binary?
What happens if you free a pointer twice?
what are the different storage classes in c?
Once I have used freopen, how can I get the original stdout (or stdin) back?
Explain how can you check to see whether a symbol is defined?
How can my program discover the complete pathname to the executable from which it was invoked?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
What are type modifiers in c?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
What is c mainly used for?
What is the difference between if else and switchstatement
What is an array? What the different types of arrays in c?
What is adt in c programming?