snippets used learning c and c++