Question: ( 5 0 pt ) Consider dated C + + comments, which are the usual C + + comments with a mandatory date in DD
pt Consider dated comments, which are the usual comments with a mandatory date
in DDMMYYYY format occurring anywhere in the first line of the comment; D M Y can be
any decimal digits. Here are some examples:
a working on New Year's eve; there must be more to life
b Modifed todai
There shuld be no mor erors.
Write a Python program dcomrm py to remove all comments from a C program. The program
should work as follows:
$ python dcomrmpy inputC.cpp inputCrmcpp
where inputC.cpp is any correct C program and inputCrmcpp is the same program with
dated comments removed. Regular comments, nondated, are allowed in the input but are not
removed.
You are not allowed to use any regular expression capabilities of Python, or external libraries, as
that would defeat the purpose of the question.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
