some beginner C snippets and/or functions