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
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.
➡️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.
Answered by
0
heya..
Here is your answer...
Determine Output:
void main() { char not; not = !2; printf("%d", not); }
C.0
It may help you...☺☺
Here is your answer...
Determine Output:
void main() { char not; not = !2; printf("%d", not); }
C.0
It may help you...☺☺
Similar questions
English,
6 months ago
Geography,
6 months ago
Math,
6 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago
Math,
1 year ago
Biology,
1 year ago