main()

{

signed int bit=512, mBit;

{

mBit = ~bit;

bit = bit & ~bit ;

printf("%d %d", bit, mBit);

}

}

a. 0, 0

b. 0, 513

c. 512, 0

d. 0, -513

Answers were Sorted based on User's Feedback



main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; p..

Answer / guest

d)

Is This Answer Correct ?    33 Yes 0 No

main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; p..

Answer / soni

b

Is This Answer Correct ?    0 Yes 2 No

main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; p..

Answer / kumaran

a

Is This Answer Correct ?    4 Yes 8 No

Post New Answer

More C Code Interview Questions

main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }

2 Answers  


main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }

1 Answers  


Is this code legal? int *ptr; ptr = (int *) 0x400;

1 Answers  


#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }

2 Answers  


#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }

1 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, BITS, Microsoft, Syncfusion, Synergy, Vector,


How will u find whether a linked list has a loop or not?

8 Answers   Microsoft,


main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }

1 Answers  


find A^B using Recursive function

2 Answers  


Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.

5 Answers   IITR, Microsoft, Nike,


#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }

3 Answers   Hexaware,


Write a program to model an exploding firecracker in the xy plane using a particle system

0 Answers   HCL,


Categories