Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Page 1 of6 Conyright 2013 Dennis Rainey HW 2abcd HW 2a -strings Write a program that produces the following output: OUTPUT Enter your age: 21

image text in transcribed
Page 1 of6 Conyright 2013 Dennis Rainey HW 2abcd HW 2a -strings Write a program that produces the following output: OUTPUT Enter your age: 21 Enter the last name: Lee Hello Tom Lee. You are 21 years old. Press any key 1.) Declare an array named: firstName The array is a c string. i.e., it is a null-terminated character array. The size of the array is 10. Assign a first name to it when it is declared. 2.) Declare an array named: The array is a c_string, - The size of the array is 10. - Don't assign a name to it. lastName 3.) Declare an array named: fullName - The array is a c string, - The size of the array is 20 - Don't assign a name to it. 4.) In maind: First ask the user for the age. o Read the age and assign it to a variable. o Read the last name and assign it to lastName. o Make sure to include a space between the names. Then ask the user for the last name. - Assign the first and last names to fullName. 5.) Call a function named: displaylnfo). The function should output the full name and age. (see output) Note: If you have problems with your output not displaying properly, review Lecture 4, particularly buffer issues

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

What is behavioral persuasion in advertising designed to do?

Answered: 1 week ago

Question

8. Demonstrate aspects of assessing group performance

Answered: 1 week ago