Q. What is the output of the C program with Modulo Division operator with - or Negative numbers.?

Code:
int main()
{
    int a = -25%-10;
    int b = -25%10;
    int c = 25%-10;
    
    printf("%d %d %d", a, b, c);

    return 0;
}
  • (A) 5 -5 5
  • (B) 5 -5 -5
  • (C) -5 -5 5
  • (D) 5 5 5
πŸ’¬ Discuss
βœ… Correct Answer: (C) -5 -5 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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