Question: 1. Write a C program called check_even.c that checks if a given integer is even or odd. This program should prompt (ask) its user to


1. Write a C program called check_even.c that checks if a given integer is even or odd. This program should prompt (ask) its user to provide a value between 0 and 255. Then, it would store this value as an 8-bit unsigned integer, check if it is even or odd, and print the corresponding message on the screen (e.g., The number is odd"). If the user inputs a value that is wider than 8 bits (larger than 256), the program should consider only the least significant 8 bits and discard the rest. What happens when the user provides a negative value? 2. Solve a puzzle. Consider the following C program, with two variable values redacted. Note that the short int type is 16 bits (2 bytes) wide, and the output statements all use (unsigned) decimal, not hex. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
