Answers were Sorted based on User's Feedback

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

Answer / susie

Answer :


Explanation :

-1 is internally represented as all 1's. When
left shifted four times the least significant 4 bits are
filled with 0's.The %x format specifier specifies that the
integer value be printed as a hexadecimal value.

Is This Answer Correct ?    72 Yes 16 No

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

Answer / sourab

thts ans is ture 4 16 bit compiler ,for 32 bit ans is fffffff0.

Is This Answer Correct ?    28 Yes 7 No

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

Answer / aruna


Is This Answer Correct ?    3 Yes 10 No

Post New Answer

More C Code Interview Questions

Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

0 Answers  

#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr()); }

2 Answers  

How do you sort a Linked List (singly connected) in O(n) please mail to if u can find an anser...i m desperate to knw...

6 Answers   Microsoft, Oracle, MSD,

Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false

1 Answers   Cognizant, lenovo,

#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }

1 Answers  

main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

6 Answers  

To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates.

19 Answers   Amazon, Syncfusion, Vector, Microsoft, Synergy, BITS,

void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(ā€œ%dā€,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(ā€œ%dā€,*cptr); }

1 Answers  

Write a c program to search an element in an array using recursion

1 Answers   Wipro,

String copy logic in one line.

11 Answers   Microsoft, NetApp,

main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); }

2 Answers  

main() { char a[4]="HELL"; printf("%s",a); }

3 Answers   Wipro,