Pearson eText for C Programming Language -- Instant Access (Pearson+)
Pearson eText for C Programming Language -- Instant Access (Pearson+)
2nd Edition
ISBN: 9780137460847
Author: Dennis Ritchie, Brian Kernighan
Publisher: PEARSON+
bartleby

Concept explainers

Question
Book Icon
Chapter 1, Problem 23E
Program Plan Intro

Program Plan-

  • Initialize the header files and main() function.
  • Ask the user to enter the text and press the Ctrl+z to end the program.
  • To define the function getline(char[], int) to store the line into array and calculate the length of the line.
  • To read the line using while loop and check if there are any comments in the line, if present remove them.
  • Finally prints the lines without comments.

Summary Introduction- The program takes the text line and prints the line after removing all the comments from the line.

Program Description- The purpose of the program is to take the take the text line and remove the comments using the fullwoing function-

getline(char[], int).

Blurred answer
Students have asked these similar questions
c++ code   Note:-  Do not provide handwritten solution. Maintain accuracy and quality in your answer. Take care of plagiarism.Answer completely.You will get up vote for sure.
In C++
Please use C++ for the problem below.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr