Skip to content
Snippets Groups Projects
Select Git revision
  • 08256e681ca958282c556749d6332bf473cf4251
  • master default
2 results

string-ops-11.c

Blame
  • Forked from Peter Gerwinski / hp
    361 commits behind the upstream repository.
    string-ops-11.c 351 B
    #include <stdio.h>
    #include <string.h>
    
    int main (void)
    {
      char *anton = "Anton";
      char *zacharias = "Zacharias";
    
      printf ("%d\n", strcmp (anton, zacharias));
      printf ("%d\n", strcmp (zacharias, anton));
      printf ("%d\n", strcmp (anton, anton));
    
      char buffer[100] = "Huber ";
      strcat (buffer, anton);
      printf ("%s\n", buffer);
    
      return 0;
    }