Skip to content
Snippets Groups Projects
Select Git revision
  • e5a55ae5d895b36506b339f1f24833424616305f
  • master default protected
  • 2018ws
  • 2017ws
  • 2016ws
5 results

functions-01.c

Blame
  • Forked from Peter Gerwinski / hp
    Source project has a limited visibility.
    string-ops-6.c 438 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));
    
      if (anton == anton)
        printf ("gleich\n");
      else
        printf ("ungleich\n");
    /*
      char buffer[100] = "Huber ";
      strcat (buffer, anton);
      printf ("%s\n", buffer);
    */
    
      return 0;
    }