Question: ( 5 0 pt ) Consider dated C + + comments, which are the usual C + + comments with a mandatory date in DD

(50pt) Consider dated C++ comments, which are the usual C++ comments with a mandatory date
in DD/MM/YYYY format occurring anywhere in the first line of the comment; D, M, Y can be
any decimal digits. Here are some examples:
(a)//31/12/2023... working on New Year's eve; there must be more to life ...!
(b)/* Modifed todai 00/00/0000
There shuld be no mor erors. */
Write a Python program dcom_rm. py to remove all comments from a C++ program. The program
should work as follows:
$ python dcom_rm.py inputC.cpp inputC_rm.cpp
where inputC.cpp is any (correct) C++ program and inputC_rm.cpp is the same program with
dated comments removed. Regular comments, non-dated, 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.
( 5 0 pt ) Consider dated C + + comments, which

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!