HP Inc. Interview Question

basic programming questions were asked