Top

Discussion

Point out the error, if any in the program.

#include
int main()
{
    int i = 1;
    switch(i)
    {
        case 1:
           printf("Case1");
           break;
        case 1*2+4:
           printf("Case2");
           break;
    }
return 0;
}

 

  • A.Error: in case 1*2+4 statement
  • B.Error: No default specified
  • C.Error: in switch statement
  • D.No Error

Answer: D

No answer description available for this question.
 

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

Post your comment