summaryrefslogtreecommitdiff
path: root/c,cc/ctype.c
blob: 03315668add6465a85d138c4030299a8dd17414d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <stdio.h>
#include <ctype.h>
#include <string.h>


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;
}