Skip to content
Snippets Groups Projects
Select Git revision
  • 4123014b9d995f28dc1b9df1a7fae593c7f77e46
  • 2024ws default protected
  • 2023ws
3 results

dbms-06.txt

Blame
  • Forked from Peter Gerwinski / Datenbanken und Datensicherheit
    Source project has a limited visibility.
    string-ops-20.c 318 B
    #include <stdio.h>
    #include <string.h>
    
    int main (void)
    {
      char buffer[10] = "";
      sprintf (buffer, "Die Antwort lautet: %d", 42);
      printf ("%s\n", buffer);
    
      char *answer = strstr (buffer, "Bntwort");
      if (answer)
        printf ("found at: %zd\n", answer - buffer);
      else
        printf ("not found\n");
    
      return 0;
    }