C How To Program Plus Mylab Programming With Pearson Etext -- Access Card Package (8th Edition)
C How To Program Plus Mylab Programming With Pearson Etext -- Access Card Package (8th Edition)
8th Edition
ISBN: 9780134227023
Author: Paul J. 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
THIS IS NOT A GRADING ASSIGNMENT: Please only do lab 2.2 (bottom part of the first picture) For that Lab 2.2 do: *Part 1 *Part 2 *Part 3 I also attached Section 2.5.2 which is part of the step 1 so you can read what is it about.   Thank you!
can you please give me: * the code (step 3) *the list file (step 5) *and answer step 6   Thank you
# Find the error# Why will the following code not print out a list of contact namesphoneBook = {'Doe, Jane' : '843-000-0000' ,'Doe, John' : '843-111-1111' ,'Smith, Adam' : '843-222-2222' ,'Jobs, Steve' : '999-333-3333' ,}for contact in phoneBook.values():print(contact)
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