All mock tests are FREE till 31 December — register to save your progress
Unit 6 · Software Engineering Paper 2 CS · 22 June 2026

In a particular program, it is found that 1% of the code accounts for 50% of the execution time. To code the program in FORTRAN, it takes 100 man-days. Coding in assembly language is 10 times harder than coding in FORTRAN, but runs 5 times faster. Converting (rewriting) an existing FORTRAN program to an assembly language program is 4 times harder than coding in FORTRAN.

The entire program is written in FORTRAN. The percentage decrease in the execution time, resulting from rewriting the 1% of code (that accounts for 50% of execution time) into assembly language, is

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. 40

Explanation

Normalize the original total execution time to 100 units. The 1% of code that is rewritten in assembly accounts for 50 of these units, and the remaining 99% of the code (left unchanged) accounts for the other 50 units. Since assembly code for that hot 1% runs 5 times faster, its execution time falls from 50 to 50/5 = 10 units, giving a new total of 50 + 10 = 60 units. The decrease is 100 - 60 = 40 units out of the original 100, a 40% decrease.

More Software Engineering questions