From 258e1b92ebbfdebefabc120969ab87c3d8b75c3d Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sun, 15 Jun 2014 03:50:12 +0200 Subject: old c,cc examples --- c,cc/ctype.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 c,cc/ctype.c (limited to 'c,cc/ctype.c') diff --git a/c,cc/ctype.c b/c,cc/ctype.c new file mode 100644 index 0000000..0331566 --- /dev/null +++ b/c,cc/ctype.c @@ -0,0 +1,43 @@ +#include +#include +#include + + +int main(void) +{ + char *a="abc"; + char *x="xyz"; + char *b="abc"; + char *y="Xyz"; + + int r; + + if(isupper(y[0])) + { + printf("%c\n",y[0]); + } + + if(r=(!strcmp(a,b))) + { + printf("%d\n",r); + } + + printf("%c\n",*x); + + if(r=(!strcmp(a,x))) + { + printf("%d\n",r); + } + + char bla[4]="aAc"; + + for( unsigned int i = 0; i < 4; i += 1 ) + { + if(isupper(bla[i])) { + printf("%c\n",bla[i]); + } + } + + return 0; +} + -- cgit v1.2.3