Question: The code here tests a user-entered character and returns values depending on whether the character is numeric, upper case, etc. Enter the code, note the

 The code here tests a user-entered character and returns values depending
on whether the character is numeric, upper case, etc. Enter the code,

The code here tests a user-entered character and returns values depending on whether the character is numeric, upper case, etc. Enter the code, note the output, and answer the questions below. Unit 5 Graded Exercise 1.c #include #include 5 6 7 8 int main(void) {printf("Enter a character: "); int - getchar(); if (isdigit(c)- e) printf("user has entered the character: Xc ", c); printf("isalnun(\'Xc1') Xd ", C, isalnum (c)) printf("isxdigit(\' \') - %d ", s, isxdigit()); printf("islower('Xc ) - Xd ", C, is lower()); printf("isupper('%c\') - Xd ", C, isupper()); printf("tolower(\'Xc1') %d ", c, tolower()); printf("toupper(\ 'Xc1') C, toupper()); printf("isspace(\'%c\') - %d C, isspace()); printf("isentrl(\'%c\') = din , C, isentri()); printf("ispunct('%c') - Xd ", C, ispunct()); printf("isprint('%c\") - %d ", C, isprint()); printf("isgraph(\*\) - Xd ", C, isgraph()); } return @ Here is what the output looks like. RACIS126\CIS126 November 2018 Development Unit 5\Unit 5 Graded Exercise Loxe Enter a character: a User has entered the character: a isalnum('a') - 2 isxdigit('a') - 128 islower('a') - 2 isupper('a') - tolower('a') - 97 toupper("a") - 65 isspace('a') - iscntrl('a') = ispunct('a') - isprint('a') - 2 isgraph('a') - 2 Process exited after 4.399 seconds with return value Press any key to continue ... Enter a character: a User has entered the character: a isalnum('a') = 2 isxdigit('a') - 128 islower('a') - 2 isupper('a') = tolower('a') = toupper('a') isspace('a') = iscntrl('a') ispunct('a') = 0 isprint('a') = isgraph('a') = 2 Process exited after 4.399 seconds with return value Press any key to continue ... When the user enters the value of "a." 1. Why does isalum() return the value 2? 2. Why does isxdigit() return the value 128? 3. Why does islower() return the value 2? 4. Why does isupper() return the value 0? 5. Why does tolower() return the value 97? 6. Why does toupper() return the value 65? 7. Why does isspace) return the value 0? 8. Why does iscntri() return the value 0? 9. Why does ispunct() return the value 0? 10. Why does isprint() return the value 2? 11. Why does isgraph() return the value 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!