Page 1 of 1

Write a C language program that will accept integers from the command line, add them up, and print out their total to th

Posted: Sat May 14, 2022 7:59 pm
by answerhappygod
Write a C language program that will accept integers from the
command line, add them up, and print out their total to the screen.
Make sure your code gets the correct total in light of potential
arithmetic overflow and underflow. Typecast the incoming ints into
longs. Sort input to prevent overflow. If the final answer is
unavoidably over or under integer MIN/MAX, then report
error.