Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need a little help with this one.. 1. ( Another library/header file): So far, you have only used stdio.h header file which contains standard input/output

Need a little help with this one..

1. (Another library/header file): So far, you have only used stdio.h header file which contains standard input/output functions such as printf() and scanf(). In this guided exercise, you will be required to include another header file, ctype.h, which contains built-in character-handling functions. Go ahead and add it to the next line below the existing stdio.h include statement as follows:

#include

3. (Housekeeping): Declare the following variables in your program using appropriate data type. When selecting a data type keep in mind the type of value you want to store, i.e., int, float, character. Also, be sure to use conventional naming standards for all variable declarations

c

4. (Display Prompt): Write a printf() statement to ask user for the following message.

Enter a character:

5. (Input): User either a scanf() statement or getchar() function to store the character the user wishes to store in the computers memory.

6. (Test isdigit( ) function): Now, use isdigit() function to test whether user has entered a character or not as following:

if (isdigit (c) = = 0)

{

printf(" User has entered the character: %c ", c); }

7. (Test other functions likewise): Similarly, test three from the following functions using your own if statement.

isupper()

iscntrl()

ispunct()

8. (Output Screen) Line 1. Enter a character - L, Line 2 User has entered the character L Line 3 isupper('L') = 0, Line 4 iscntrl('L'} = 0, Line 5 ispunct('L') = 0 Line 6 Press any key to continue.

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

Intelligent Information And Database Systems Third International Conference Achids 2011 Daegu Korea April 2011 Proceedings Part 2 Lnai 6592

Authors: Ngoc Thanh Nguyen ,Chong-Gun Kim ,Adam Janiak

2011th Edition

3642200419, 978-3642200410

More Books

Students also viewed these Databases questions

Question

Develop successful mentoring programs. page 400

Answered: 1 week ago