Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.    int x = 'a';
  6.    char y = x;
  7.  
  8.    char *a = "hello";
  9.  
  10.    printf("%s\n", a);
  11.  
  12.    int c;
  13.    c = *a;
  14.  
  15.    char *b;
  16.    for (b = a; *b != 0; b++)
  17.       printf("%c: %d\n", *b, *b);
  18.  
  19.    char destarray[10];
  20.    char *dest = &destarray[0];
  21.    char *src = a;
  22.  
  23.    while (*src != 0)
  24.       *dest++ = *src++;
  25.  
  26.    *dest = 0;
  27.  
  28.    printf("copied string is %s\n", destarray);
  29.  
  30.    return 0;
  31. }
  32.  
  33. /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
  34.