Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #96717

Re: Integer type extension and switch

From Ike Naar <ike@iceland.freeshell.org>
Newsgroups comp.lang.c
Subject Re: Integer type extension and switch
Date 2016-11-16 21:45 +0000
Organization A noiseless patient Spider
Message-ID <slrn3vfso2pkso.cj.ike@iceland.freeshell.org> (permalink)
References <326617a3-8f24-4110-8349-db7a0c17e7de@googlegroups.com>

Show all headers | View raw


On 2016-11-15, janus <emekamicro@gmail.com> wrote:
> Hello All,
>
> Why is the below not printing anything at all?
>
>   #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;
>   }

Because you wrote it that way.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Integer type extension and switch janus <emekamicro@gmail.com> - 2016-11-15 13:43 -0800
  Re: Integer type extension and switch Richard Heathfield <rjh@cpax.org.uk> - 2016-11-15 21:48 +0000
  Re: Integer type extension and switch supercat@casperkitty.com - 2016-11-15 13:49 -0800
  Re: Integer type extension and switch Keith Thompson <kst-u@mib.org> - 2016-11-15 13:54 -0800
  Re: Integer type extension and switch Ike Naar <ike@iceland.freeshell.org> - 2016-11-16 21:45 +0000
  Re: Integer type extension and switch "Mr. Man-wai Chang" <toylet.toylet@gmail.com> - 2016-11-17 22:17 +0800

csiph-web