Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

image text in transcribed

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

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

Step: 3

blur-text-image

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

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions