c puzzle #6


#include<stdio.h>
  int main()
  {
          int a=10;
          switch(a)
          {
                  case '1':
                      printf("ONE\n");
                      break;
                  case '2':
                      printf("TWO\n");
                      break;
                  defa1ut:
                      printf("NONE\n");
          }
          return 0;
  }
If you expect the output of the above program to be NONE, I would request you to check it out!!

3 comments:

  1. how the default case not works here ?

    ReplyDelete
    Replies
    1. Hi Buddy,

      Check the spelling of default:

      here (def(a1u)t:) has given instead of def(aul)t:
      This is the blunder question.

      Plz check by changing it.

      Regards
      Your well wisher

      Delete
  2. defa1ut: should be default:

    ReplyDelete

Your answer for the question

Related Posts Plugin for WordPress, Blogger...