Skip to content
Snippets Groups Projects
Select Git revision
  • 4ff440eaac9aee21bd0a6c7f5ce7927ee4cd9b94
  • master default
2 results

qsort-1.c

Blame
  • Forked from Peter Gerwinski / hp
    Source project has a limited visibility.
    loesung-2.c 352 B
    #include <stdio.h>
    #include <string.h>
    
    void insert_into_string (char src, char *target, int pos)
    {
      int len = strlen (target);
      for (int i = len; i >= pos; i--)
        target[i + 1] = target[i];
      target[pos] = src;
    }
    
    int main (void)
    {
      char test[100] = "Hochshule Bochum";
      insert_into_string ('c', test, 5);
      printf ("%s\n", test);
      return 0;
    }