Computer Science, asked by tittala7115, 1 year ago

Determine Output:

void main() { char not; not = !2; printf("%d", not); }
A.2
B.Garbage Value
C.0
D.None of These

Answers

Answered by Anonymous
0
______✨ HEY MATE ✨______

➡️Option (C) 0 is the right answer ✔️

Reason :- ! 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.

<marquee>✌️ I THINK IT HELPED YOU ✌️
Answered by Anonymous
0
heya..

Here is your answer...

Determine Output:

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

C.0

It may help you...☺☺
Similar questions