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

Which version do you prefer of the following two, 1) printf(ā€œ%sā€,str); // or the more curt one 2) printf(str);

1 Answers  


Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??

0 Answers   Home,


how to return a multiple value from a function?

2 Answers   Wipro,


How can i find first 5 natural Numbers without using any loop in c language????????

2 Answers   Microsoft,


what is variable length argument list?

2 Answers  






#include <stdio.h> int main(void) { int a=4, b=2; a=b<<a+b>>2 ; printf("%d",a); return 0; }

0 Answers   Student,


main() { char not; not=!2; printf("%d",not); }

1 Answers  


main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }

2 Answers  


void main() { int i; char a[]="\0"; if(printf("%s\n",a)) printf("Ok here \n"); else printf("Forget it\n"); }

3 Answers   Accenture,


given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit

8 Answers  


You are given any character string. Find the number of sets of vowels that come in the order of aeiou in the given string. For eg., let the given string be DIPLOMATIC. The answer returned must be "The number of sets is 2" and "The sets are "IO and AI". Vowels that form a singleton set must be neglected. Try to post the program executable in gcc or g++ or in java.

3 Answers  


#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }

1 Answers  


Categories