Question: Assignment #1: Scanf Properties (25 marks - 5 marks per section) DUE: September 20, 2022 Individual effort You can answer on the sheet or

Assignment #1: Scanf Properties (25 marks - 5 marks per section) DUE: September 20, 2022 Individual effort

Assignment #1: Scanf Properties (25 marks - 5 marks per section) DUE: September 20, 2022 Individual effort You can answer on the sheet or a separate sheet Type out each of the following programs, and answer the questions. Be sure that you have the debugger working for the Dev-C++ (or whatever C compiler that you are using). Hopefully we will take up the experiments during class. Base Experiment 1: Type out the following code in your compiler This is base code that we will modify in the following experiments (our base operating reference) #include int main(void) { int Value1, Value2; PRETT printf("Please enter the first value"); scanf("%d",&Value1); printf("Please enter the second value"); scanf("%d",& Value2); Value1= Value1 + Value2; printf("The result is %d", Value1); return 0; } 1. Confirm that the program works as expected by entering 2 different integers. 2. For the first number enter a character instead of an integer and note what happens on the screen. Assignment #1: Scanf Properties (25 marks - 5 marks per section) DUE: September 20, 2022 Individual effort You can answer on the sheet or a separate sheet Type out each of the following programs, and answer the questions. Be sure that you have the debugger working for the Dev-C++ (or whatever C compiler that you are using). Hopefully we will take up the experiments during class. Base Experiment 1: Type out the following code in your compiler This is base code that we will modify in the following experiments (our base operating reference) #include int main(void) { int Value1, Value2; PRETT printf("Please enter the first value"); scanf("%d",&Value1); printf("Please enter the second value"); scanf("%d",& Value2); Value1= Value1 + Value2; printf("The result is %d", Value1); return 0; } 1. Confirm that the program works as expected by entering 2 different integers. 2. For the first number enter a character instead of an integer and note what happens on the screen.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The image contains an assignment task related to a C programming exercise that involves the use of s... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!