main()

{

char not;

not=!2;

printf("%d",not);

}



main() { char not; not=!2; printf("%d",not); }..

Answer / susie

Answer :

0

Explanation:

! is a logical operator. In C the value 0 is considered to
be the boolean value FALSE, and any non-zero value is
considered to be the boolean value TRUE. Here 2 is a
non-zero value so TRUE. !TRUE is FALSE (0) so it prints 0.

Is This Answer Correct ?    17 Yes 0 No

Post New Answer

More C Code Interview Questions

print a semicolon using Cprogram without using a semicolon any where in the C code in ur program!!

35 Answers   Tata Elxsi, TCS, VI eTrans,


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

0 Answers   TCS,


main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above

3 Answers   HCL,


How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.

1 Answers  


plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............

2 Answers   Wipro,






How to count a sum, when the numbers are read from stdin and stored into a structure?

1 Answers  


Who could write how to find a prime number in dynamic array?

1 Answers  


how to return a multiple value from a function?

2 Answers   Wipro,


why the range of an unsigned integer is double almost than the signed integer.

1 Answers  


main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

2 Answers  


code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123

1 Answers   HCL,


main() { char *p = “ayqm”; char c; c = ++*p++; printf(“%c”,c); }

1 Answers  


Categories