πŸ“Š C Programming
Q. Determine Output
Code:
void main()
{
      int i=10;
      i=!i>14;
      printf("i=%d", i);
}
  • (A) 10
  • (B) 14
  • (C) 0
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (C) 0

Explanation: In the expression !i>14 , NOT (!) operator has more precedence than ">" symbol. ! is a unary logical operator. !i (!10) is 0 (not of true is false). 0>14 is false (zero).

Explanation by: Prashant
In the expression !i>14 , NOT (!) operator has more precedence than ">" symbol. ! is a unary logical operator. !i (!10) is 0 (not of true is false). 0>14 is false (zero).

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
212
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Prashant
Publisher
πŸ“ˆ
87%
Success Rate