DIY: Count a Word in the Comments
We'll cover the following
Problem statement
In this challenge, you are given two arguments: a list of strings containing lines of a C++ source code and a string containing a word. Your task is to identify which parts of the code are comments, and then count all occurrences of the input word present in the comments of the given source code.
Input
The first input will be a list of strings ...
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Devpath's Terms of Service and Privacy Policy