main()

{

signed int bit=512, i=5;

for(;i;i--)

{

printf("%d\n", bit >> (i - (i -1)));

}

}

a. 512, 256, 0, 0, 0

b. 256, 256, 0, 0, 0

c. 512, 512, 512, 512, 512

d. 256, 256, 256, 256, 256

Answers were Sorted based on User's Feedback



main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n"..

Answer / guest

d) bit's value is not changed

Is This Answer Correct ?    27 Yes 1 No

main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n"..

Answer / shanker

Query : When bits cant be changed, then option c is also
correct?

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C Code Interview Questions

How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)

4 Answers   HCL,


main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

2 Answers  


Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

2 Answers   Wipro,


main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above

5 Answers   HCL,


Cau u say the output....?

1 Answers  






why array index always strats wuth zero?

2 Answers  


Sorting entire link list using selection sort and insertion sort and calculating their time complexity

1 Answers   Infosys, Microsoft, NetApp,


main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }

1 Answers  


Printf can be implemented by using __________ list.

3 Answers  


write a program in c to merge two array

2 Answers  


main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }

2 Answers  


main() { printf("%x",-1<<4); }

3 Answers   HCL, Sokrati, Zoho,


Categories