1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
klio [65]
2 years ago
5

Write a C program to input a character, then check if the input

Computers and Technology
1 answer:
rodikova [14]2 years ago
6 0

Answer:

// CPP program to find type of input character

#include <iostream>

using namespace std;

void charCheck(char input_char)

{

// CHECKING FOR ALPHABET

if ((input_char >= 65 && input_char <= 90)

|| (input_char >= 97 && input_char <= 122))

cout << " Alphabet ";

// CHECKING FOR DIGITS

else if (input_char >= 48 && input_char <= 57)

cout << " Digit ";

// OTHERWISE SPECIAL CHARACTER

else

cout << " Special Character ";

}

// Driver Code

int main()

{

char input_char = '$';

charCheck(input_char);

return 0;

}

Explanation:

// CPP program to find type of input character

#include <iostream>

using namespace std;

void charCheck(char input_char)

{

// CHECKING FOR ALPHABET

if ((input_char >= 65 && input_char <= 90)

|| (input_char >= 97 && input_char <= 122))

cout << " Alphabet ";

// CHECKING FOR DIGITS

else if (input_char >= 48 && input_char <= 57)

cout << " Digit ";

// OTHERWISE SPECIAL CHARACTER

else

cout << " Special Character ";

}

// Driver Code

int main()

{

char input_char = '$';

charCheck(input_char);

return 0;

}

You might be interested in
Which element is located on the top left of the Word screen?
victus00 [196]
The <span>element located on the top left of the Word screen is the Quick Access Toolbar.  </span>On the quick access toolbar, you can find some of the common functions that you will need to use on a regular basis, it contains commands that are used most often, for example Redo, Undo and Save etc.
7 0
2 years ago
Systems such as smartphones, appliances, game controllers, cable set-top boxes and automobiles that contain small computers are
Setler [38]

I guess the correct answer is Embedded system.

Systems such as smartphones, appliances, game controllers, cable set-top boxes and automobiles that contain small computers are called Embedded systems.

8 0
2 years ago
Password combined with pin used as an authentication requirement is an example of:
Bingel [31]
...something that the user knows.
4 0
3 years ago
Examine the following output:
zepelin [54]

Answer:

a. tracert

Explanation:

Tracert is a computer network diagnostic demand which displays possible routes for internet protocol network. It also measures transit delays of packets across network. The given output is produced by a tracert command.

8 0
3 years ago
Briefly describe the client/server model.
Lesechka [4]
<span>a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requester, called clients</span>
6 0
3 years ago
Other questions:
  • The monkey-and-bananas problem is faced by a monkey in a laboratory with some bananas hanging out of reach from the ceiling. A b
    8·1 answer
  • Your worksheet has the value 27 in cell B3. What value is<br>returned by the function =MOD(B3,6)?​
    8·1 answer
  • Identify the independent and dependent variable in the statement: the number of hours studying for a class and the grade earned.
    12·1 answer
  • Which is not a factor that leads to technological advancement?
    8·1 answer
  • How do Computer Scientists use Binary Code?
    14·1 answer
  • Which type of protocol allows for a secure data transmission using encryption methods?
    7·1 answer
  • If i keep giving out brainlyest will i get banned again?
    12·2 answers
  • This function chooses the screen to display based on the score.What is the correct way to call this function?
    13·2 answers
  • The average American has 10 devices, ask for users average number of devices. Any number between 7 and 12 will print “you have a
    13·1 answer
  • The full meaning of UNIVAC and ENIAC​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!