Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

void main()


if(~0 == (unsigned int)-1)

printf(“You can answer this if you know how values are
represented in memory”);


void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if yo..

Answer / susie

Answer :

You can answer this if you know how values are
represented in memory


~ (tilde operator or bit-wise negation operator) operates on
0 to produce all ones to fill the space for an integer. –1
is represented in unsigned value as all 1’s and so both are

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C Code Interview Questions

find simple interest & compund interest

2 Answers  

Finding a number which was log of base 2

1 Answers   NetApp,

main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &, &student.dob.month, &student.dob.year); }

1 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, MSD, Oracle,

int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p

2 Answers  

#include<stdio.h> int main() { int x=2,y; y=++x*x++*++x; printf("%d",y); } Output for this program is 64. can you explain how this output is come??

1 Answers  

main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }

2 Answers  

Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }

1 Answers  

Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable, but aac or bcd are unacceptable.

5 Answers   Amazon, Microsoft,

How to reverse a String without using C functions ?

33 Answers   Matrix, TCS, Wipro,

Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 Answers  

main() { int c=- -2; printf("c=%d",c); }

1 Answers   TCS,