C How To Program, Global Edition
C How To Program, Global Edition
8th Edition
ISBN: 9781292110974
Author: Paul Deitel, Harvey Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 21, Problem 21.18E
Program Plan Intro

Program Plan:

  • Include necessary header files.
  • Start “main()” function.
    • Declare two arrays to get input.
    • Use getline() function to get input in array “ a ”, with delimiter being ‘c’.
    • Use peek function to display next character in the input stream.
    • Use get() function to get input in array “ b ”, with delimiter being ‘c’.
    • Use peek function to display next character in the input stream.
    • Display both the strings entered.
    • Use strlen() function to calculate the length of input, add one to it and check if it is a null character. It will tell that if the string ends with null character or not.
  • Return an exit the program

Program Description:

The followingprogram checksfunctionality of getline() and get() function.

Blurred answer
Students have asked these similar questions
Need help with this in python!
Need help with this in python!
Help! How do I turn the flowchart that searches for a name in an array of names into structured and spaced pseudocode?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr