Aspire Faculty ID #12760 · Topic: JECA MCA 2023 · Just now
JECA MCA 2023

What is the output?

#include <stdio.h>
enum colors{RED, BROWN, ORANGE};
void main(){
  printf("%ld..%f..%d", RED, BROWN, ORANGE);
}

Solution

Explanation: The format specifiers do not match the data types (%f is used for int). This causes undefined behavior. The program may compile, but the output is not reliable. Correct choice: None of these.

Previous 10 Questions — JECA MCA 2023

Nearest first

Next 10 Questions — JECA MCA 2023

Ascending by ID
Ask Your Question or Put Your Review.

loading...