main()

{

int i = 0xff ;

printf("\n%d", i<<2);

}

a. 4

b. 512

c. 1020

d. 1024

Answers were Sorted based on User's Feedback



main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 ..

Answer / pavan_mustyala

binary representation of 0xff is 11111111

left shift by 2 results in 1111111100 which is equivalent
to 1020 in decimal.

Is This Answer Correct ?    22 Yes 0 No

main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 ..

Answer / guest

c) 1020

Is This Answer Correct ?    19 Yes 0 No

Post New Answer

More C Code Interview Questions

main() { static int a[3][3]={1,2,3,4,5,6,7,8,9}; int i,j; static *p[]={a,a+1,a+2}; for(i=0;i<3;i++) { for(j=0;j<3;j++) printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j), *(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i)); } }

1 Answers  


create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00

0 Answers   Microsoft,


main() { printf("%d", out); } int out=100;

3 Answers  


main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }

1 Answers  


plz send me all data structure related programs

2 Answers  






how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

0 Answers  


struct Foo { char *pName; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); strcpy(obj->pName,"Your Name"); printf("%s", obj->pName); } a. Your Name b. compile error c. Name d. Runtime error

3 Answers   HCL,


1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?

2 Answers  


main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }

2 Answers  


main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }

1 Answers   Zoho,


find A^B using Recursive function

2 Answers  


What is full form of PEPSI

0 Answers  


Categories