EBK C HOW TO PROGRAM
EBK C HOW TO PROGRAM
8th Edition
ISBN: 9780133964639
Author: Deitel
Publisher: PEARSON CUSTOM PUB.(CONSIGNMENT)
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
(True/False): The ReadConsole function reads mouse information from the input buffer
. (True/False): A segment selector points to an entry in a segment descriptor table
(True/False): A segment descriptor contains the base location of a segment.
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