if, else in c snippets