Question
Write a program in C language that request a first name, then a last name, and a decimal value specifying an ASCII character. On the
Write a program in C language that request a first name, then a last name, and a decimal value specifying an ASCII character.
On the first line print the first name and last name enclosed in double quotation marks;
On the second line print the ASCII character for the decimal value such that it always will align with the LAST character of each name no matter what first and last name is used.
Inputs: Dana, Swift, 94
Outputs:
" Dana" "Swift" ^ ^ |
Inputs: Melissa, Honeybee, 42
Outputs:
"Melissa" "Honeybee" * * |
Inputs: Joe, Johnson, 124
Ouputs:
"Joe" "Johnson" | | |
Test several ASCII codes, and names.
Name your name and CWID in each sheet.
Notes:
Note the * format modifier for printf from chapter 4, must be used for this assignment to work. Also the strlen() function from chapter 4 will be needed.
In order to use string functions, it is necessary to include the header line:
#include
For scanf to work, include the header line:
#pragma warning(disable: 4996)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started