Skip to content

Instantly share code, notes, and snippets.

View Xjs's full-sized avatar

Jannis Andrija Schnitzer Xjs

View GitHub Profile
@Xjs
Xjs / himmelblau.c
Last active December 29, 2015 09:19 — forked from anonymous/himmelblau.c
int compare_some_strings (char *a, char *b)
// compare some strings, return -1 if equal, otherwise the position of the first difference.
{
int i;
for (i = 0; a[i] != 0 && b[i] != 0; i++)
if (a[i] != b[i])
return i;
// wenn wir hier angekommen sind, sind sie bis zum Punkt i gleich
if (a[i] == 0 && b[i] == 0) // sie sind ganz gleich