main()

{

signed int bit=512, i=5;

for(;i;i--)

{

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

}

}

a. 512, 256, 128, 64, 32

b. 256, 128, 64, 32, 16

c. 128, 64, 32, 16, 8

d. 64, 32, 16, 8, 4

Answers were Sorted based on User's Feedback



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

Answer / guest

b)

Is This Answer Correct ?    11 Yes 0 No

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

Answer / lucky varshney

c

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Code Interview Questions

main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }

1 Answers  


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.

6 Answers   Fusion Systems GmbH,


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

1 Answers  


What is full form of PEPSI

0 Answers  


main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }

29 Answers   IBM, TCS, UGC NET, Wipro,






main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }

1 Answers  


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

8 Answers   GATE,


Write a C function to search a number in the given list of numbers. donot use printf and scanf

5 Answers   Honeywell, TCS,


what is the code of the output of print the 10 fibonacci number series

2 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() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }

1 Answers  


Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.

21 Answers   ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,


Categories