main()
{
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
}
Answer Posted / anand h i
in printf functiton evaluation of variables start from
right to left so first it evaluates
x>>2
101 after right shift of 2 it will be 001=1
next it will evaluate
x<<2
1 after left shift of 2 it will be 100=4
at the last x=4
so answer is 4 4 1
| Is This Answer Correct ? | 3 Yes | 13 No |
Post New Answer View All Answers
Can we declare function inside main?
What is array of pointers to string?
Can a variable be both const and volatile?
What are pointers in C? Give an example where to illustrate their significance.
Whats s or c mean?
Write a program to generate the Fibinocci Series
Combinations of fibanocci prime series
Do you have any idea about the use of "auto" keyword?
What is static and volatile in c?
Explain what are its uses in c programming?
What does != Mean in c?
Why do we need arrays in c?
how can I convert a string to a number?
How would you obtain the current time and difference between two times?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given