Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

visual studios image text in transcribed
image text in transcribed
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 c - getchar() if (isdigit(c)- e) printf("user has entered the character: Xc ", c); printf("isalnun(\'Xc1') Xd ", C, isalnum (c)) printf("isxdigit(\'Xc1') - Xd ", s, isxdigit()); printf("islower(\'Xc1') - Xd ", C, islower()); printf("isupper('%c ) - Xd ", C, isupper()); printf("tolower(\' \') = %d ", C, tolower()); printf("toupper('Xc\') toupper()); printf("isspace(\'%c\') - %d C, isspace()); printf("isentrl(\'%c\') = din C ischtr1(c)); printf("ispunct('%c') - %d ", C, ispunct()); printf("isprint('XcW) - %d ", C, isprint()); printf("isgraph('X ') - Xd ", C, isgraph()); } return @ Here is what the output looks like. RACIS126 CIS126 November 2018 Development Unit 5\Unit 5 Graded Exercise Lee 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 e 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') = 0 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential Data Protection For Estate Agencies In Singapore 2024

Authors: Yang Yen Thaw Yt

1st Edition

B0CQK79WD3, 979-8872095392

More Books

Students also viewed these Databases questions