Write a program that reads a source file and writes out the names…Write a program that reads a source file and writes out the names of files #included.Indent file names to show files #included by included files. Try this program on some realsource files (to get an idea of the amount of information included). ( *3) Modify the program from the previous exercise to print the number of comment lines,the number of non-comment lines, and the number of non-comment, whitespace-separatedwords for each file #included. ( *2.5) An external include guard is a construct that tests outside the file it is guarding andincludes only once per compilation. Define such a construct, devise a way of testing it, anddiscuss its advantages and disadvantages compared to the include guards described in§15.3.3. Is there any significant run-time advantage to external include guards on your sys-tem? ( *3) How is dynamic linking achieved on your system? What restrictions are placed ondynamically linked code? What requirements are placed on code for it to be dynamicallylinked? ( *3) Open and read 100 files containing 1500 characters each. Open and read one file con-taining 150,000 characters. Is there a performance difference? What is the highest numberof files that can be simultaneously open on your system? Consider these questions in relationto the use of #include files. ( *2) Modify the desk calculator so that it can be invoked from main() or from other functionsas a simple function call. ( *2) Draw the ”module dependency diagrams” (§15.3.2) for the version of the calculator thatused error() instead of exceptions (§14.2.2)rogram that takes a set of test scores of a student. It then uses two functions calcula-teSum() and calculateAverage() to calculate the sum and average of the data set.Your program must use the following functions:1. A value-returning function, calculateSum(), to determine the sum of the test scores. Usea loop to read and sum the test scores. The function does not output the sum of the testscores. This task must be done in the main function2. A void function, calculateAverage(), to determine the average of the test scores. Thefunc- tion does not output the average test score. This task must be done in the mainfunction. Hint: Use pass by reference for average variable JUSTIFY YOUR ANSWERS Computer ScienceEngineering & TechnologyObject-Oriented Programming GEN/ 13
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more