Follow Our FB Page << CircleMedia.in >> 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..

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

Explanation

~ (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
equal.

 Is This Answer Correct ? 3 Yes 0 No

More C Code Interview Questions

find simple interest & compund interest

Finding a number which was log of base 2

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

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

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

#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??

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

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

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.

How to reverse a String without using C functions ?

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

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

Categories
• C Code (422)
• C++ Code (128)
• VC++ Code (17)
• Java Code (84)
• Dot Net Code (114)
• Visual Basic Code (11)
• Programming Code AllOther (62)