Verizon interview question

Basic c problems