Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

main()
{
int a=4,b=2;
a=b<<a + b>>2;
printf("%d", a);
}

Answer Posted / neha saxena

a=b<<a+b>>2
=2<<4+2>>2

According to precedence Table
1) + operated very 1st, (4+2=6)
2) then<< (left shift), (2<<6, 2 shifted left side 6 times
= 128)
3) and at last >> (right shift), (128>>2, 128 shifted right
side 2 times = 32)

Explanation in Answer No. 5, 6 & 7 are wrong

Is This Answer Correct ?    173 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I remove the leading spaces from a string?

1096


What are pointers? What are stacks and queues?

1063


What is uint8 in c?

1054


What is a example of a variable?

949


Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

1054


Write a program to check prime number in c programming?

1028


What is a pointer on a pointer in c programming language?

1091


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

1377


In which header file is the null macro defined?

1301


If null and 0 are equivalent as null pointer constants, which should I use?

1119


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

1211


What are identifiers in c?

1144


Write a code to determine the total number of stops an elevator would take to serve N number of people.

1187


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1449


Write program to remove duplicate in an array?

1025