Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Test With the following: (PLEASE PROVIDE SOURCE CODE) TEST CASE: printf(Hello,/* Not a comment */ World!!); printf(Hello,// Not a comment /**/ World!!); // this is

image text in transcribedTest With the following: (PLEASE PROVIDE SOURCE CODE)

TEST CASE:

printf("Hello,/* Not a comment */ World!!");

printf("Hello,// Not a comment /**/ World!!");

// this is a comment that will be removed

/* Will be

Removed */

OUTPUT:

printf("Hello,/* Not a comment */ World!!");

printf("Hello,// Not a comment /**/ World!!");

(30pt) Write a C program, remove_comments.cpp that removes comments from a given C program that is assumed to be correct. Your program will accept one input file in the command line: $ remove_comments input_C_source.cpp and will write the output in the file input_c_source_rem.cpp. There are two types of comments: (1) // ... ENTER and (2) /* ... */. Your program should remove all instances of both types from any possible C source code file. You are not allowed to use any tools to build your program; it has to be written by hand

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

More Books

Students also viewed these Databases questions

Question

=+1. How does your message use verbal communication?

Answered: 1 week ago

Question

Analyze the impact of labor unions on health care.

Answered: 1 week ago

Question

Assess three motivational theories as they apply to health care.

Answered: 1 week ago

Question

Discuss the history of U.S. labor unions.

Answered: 1 week ago