Consider the following C program carefully. What will be printed on the screen when this program is compiled and executed?
#include <stdio.h>
int main() {
int p = 3, q = 8, r;
r = (p > 5) ? p++ : q++;
printf("%d %d %d", p, q, r);
return 0;
}3 9 8
3 9 9
4 9 8
3 8 8
The verified answer and full solution are one login away
Every answer here is machine verified, with a step-by-step solution that teaches the method. Your login also unlocks a 7-question mock preview in the real exam interface.
Log in to see the answerMore operators questions