Top

Discussion

Predict the output of the below program:

#include 
#define EVEN 0
#define ODD 1
int main()
{
    int i = 3;
    switch (i & 1)
    {
        case EVEN: printf("Even");
                break;
        case ODD: printf("Odd");
                break;
        default: printf("Default");
    }
    return 0;
}

 

  • A.Even
  • B.Odd
  • C.Default
  • D.Compile-time error

Answer: B

No answer description available for this question.
 

No comment is present. Be the first to comment.
Loading…

Post your comment