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

Answers were Sorted based on User's Feedback



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

Answer / shital

ans is :32

Is This Answer Correct ?    23 Yes 1 No

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

Answer / vineetha

tell this answer and mail to this id vachika90@gmail.com

Is This Answer Correct ?    8 Yes 2 No

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

Answer / sanjay bhosale

statement a=b<<a + b>>2;
will be treated as
a=(b<<(a+b))>>2;

and gives output 32.

Is This Answer Correct ?    5 Yes 0 No

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

Answer / a.jayashree

ans is=10;

if its wrong give me right ans to jshree20@gmail.com

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

there is two conditions , 1. while using for loop for printing 1 to 50 no's simulteneous 2. while using printf functios for printing 1 to 50 no's simulteneous with or without using variables who will take more time for compiling and execution? explain in details with reason?

1 Answers  


How do you view the path?

0 Answers  


int a=20; int b=30; int c=40; printf("%d%d%d"); what will be the output?

5 Answers   CMC,


what is the c.

3 Answers   IBM, TCS,


main() { float a=8.8; double b=8.8; if(a==b) printf("Equal"); else printf("not equal"); getch(); } what is the output? with reason

6 Answers   CSC,






main() { int i = -3,j=2,k=0,m; m= ++i || ++j && ++k; printf("%d%d%d",i,j,k,m); }

7 Answers   HCL,


An entire structure variable can be assigned to another structure variable if __________

3 Answers   Sasken, TCS, Tech Mahindra, Wipro,


How can I read/write structures from/to data files?

0 Answers  


Can a program have two main functions?

0 Answers  


Which control loop is recommended if you have to execute set of statements for fixed number of times?

0 Answers  


Explain the difference between the local variable and global variable in c?

0 Answers  


Write a program to maintain student’s record. Record should not be available to any unauthorized user. There are three (3) categories of users. Each user has its own type. It depends upon user’s type that which kind of operations user can perform. Their types and options are mentioned below: 1. Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record) 2. Super Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record, Delete Single Record) 3. Guest (Search Record [by Reg. No or Name], View All Records) When first time program runs, it asks to create accounts. Each user type has only 1 account (which means that there can be maximum 3 accounts). In account creation, following options are required: Login Name: <6-10 alphabets long, should be unique> Password: <6-10 alphabets long, should not display characters when user type> Confirm Password: <must match with the Password, should not display characters when user type> Account Type: <One character long, A or S or G where A for Admin, S for Super Admin, G for Guest> Login Name, Password and Account Type should be stored in a separate file in encrypted form. (Encryption means that actual information should be changed and Decryption means that Encrypted information is changed back to the actual information) If any of the above mentioned requirement(s) does not meet then point out mistake and ask user to specify information again. When Program is launched with already created accounts, it will ask for user name and password to authenticate. On successful authentication, give options according to the user’s type.

0 Answers  


Categories