Various questions & my solutions in C