Question: Write a program any in programming language that reads a file containing a code written in a 'C' language and display the frequency of the
Write a program any in programming language that reads a file containing a code written in a 'C' language and display the frequency of the occurrences of Keywords, Identifiers, Numbers, operators and punctuations given in a file. For simplification, assume only following Keywords, operators and punctuations:
Keywords: { if, else, main, void, printf} Operators: { +, -, * , /, ==, =,} Punctuations: { (, ), {, }, [, ], ;, " } Note: Use regular expression for recognizing Keywords, Identifiers, Numbers, operators and punctuations
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
