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 to use power function under linux environment.eg : for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined reference to 'pow'.

2 Answers  


WAP to display 1,2,3,4,5........N

2 Answers  


Write a routine to implement the polymarker function

0 Answers   TCS,


code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123

1 Answers   HCL,


how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!

8 Answers   GATE,






main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O

4 Answers   HCL,


main() { int a[10]; printf("%d",*a+1-*a+3); }

1 Answers  


#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }

1 Answers  


#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }

1 Answers  


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

2 Answers   HCL,


How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?

0 Answers  


why is printf("%d %d %d",i++,--i,i--);

4 Answers   Apple, Cynity, TCS,


Categories