Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Your programs must include the following information in comments: (1) problem number, (2) course information, (3) assignment, (4) date, and (5) student name. 1. (20
Your programs must include the following information in comments: (1) problem number, (2) course information, (3) assignment, (4) date, and (5) student name. 1. (20 points) Modify the given read line function each of the following ways: a. Have it skip white space before beginning to store input characters. Name this function read line a b. Have it stop reading at the first white space character. Name this function read line b. c. Have it stop reading at the first new-line character, then store the new-line character in the string. Name this function read line c. d. Have it leave behind the characters that it doesn't have room to store. Do not read these from input. Name this function read line d. You will submit a program that calls each ofthe four read line functions. Your program should call each of the functions from main and display the resulting strings. Use these global constants for the whitespace characters: Global Constants const int horizontalTab 9; const int linefeed 10; const int verticalTab 11; const int space 32; Ifn int read line (char str0, int n) brief reads characters from standard input and stores them in str. *\param[in] str character array "Vparam[in] n ength of str array * eturn number of characters stored in str
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