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

How we print the table of 2 using for loop in c programing?

14 Answers   HCL, Wipro,


How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)

4 Answers   HCL,


#include <stdio.h> int main(void) { int a=4, b=2; a=b<<a+b>>2 ; printf("%d",a); return 0; }

0 Answers   Student,


#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }

1 Answers  


main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?

2 Answers  






main() { int i=4,j=7; j = j || i++ && printf("YOU CAN"); printf("%d %d", i, j); }

1 Answers  


prog. to produce 1 2 3 4 5 6 7 8 9 10

4 Answers   TCS,


How to access command-line arguments?

4 Answers  


main() { show(); } void show() { printf("I'm the greatest"); }

2 Answers  


main() { static int var = 5; printf("%d ",var--); if(var) main(); }

1 Answers  


Cluster head selection in Wireless Sensor Network using C programming language.

0 Answers  


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

2 Answers  


Categories