GateAI
Programming in C

GATE CSE 2011 · Q5

MCQ1 markMedium

Time

A company needs to develop a strategy for software product development for which it has a choice of two programming languages L1 and L2. The number of lines of code (LOC) developed using L2 is estimated to be twice the LOC developed with L1. The product will have to be maintained for five years. Various parameters for the company are given in the table below. Total cost of the project includes cost of development and maintenance. What is the LOC for L1 for which the cost of the project using L1 is equal to the cost of the project using L2? (A) 4000 (B) 5000 (C) 4333 (D) 4667

GATE CSE 2011 Q5 diagram

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: B) 5000

Programming in C

Let the number of lines of code for Language L1 be LL. Then, the LOC for Language L2 is 2L2L.

For Language L1:

  • Man years needed for development: L10000\frac{L}{10000}

  • Development Cost: L10000×10,00,000=100L\frac{L}{10000} \times 10,00,000 = 100L

  • Maintenance Cost for 5 years: 5×1,00,000=5,00,0005 \times 1,00,000 = 5,00,000

  • Total Cost for L1: CostL1=100L+5,00,000\text{Cost}_{L1} = 100L + 5,00,000

For Language L2:

  • Man years needed for development: 2L10000=L5000\frac{2L}{10000} = \frac{L}{5000}

  • Development Cost: 2L10000×7,50,000=150L\frac{2L}{10000} \times 7,50,000 = 150L

  • Maintenance Cost for 5 years: 5×50,000=2,50,0005 \times 50,000 = 2,50,000

  • Total Cost for L2: CostL2=150L+2,50,000\text{Cost}_{L2} = 150L + 2,50,000

Equating both costs:

100L+5,00,000=150L+2,50,000100L + 5,00,000 = 150L + 2,50,000
50L=2,50,00050L = 2,50,000
L=2,50,00050=5000L = \frac{2,50,000}{50} = 5000

Thus, the lines of code (LOC) for L1 is 5000 (Option B).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Programming in C previous year question is Q5 of the GATE CSE 2011 paper. Find more GATE CSE PYQs on Programming in C in Programming and Data Structures, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Programming in C PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Programming in C in GATE CSE

Programming in C has 74 GATE CSE PYQs across 25 papers from 2011 to 2026. 20 of them are 1-mark MCQs like this one, and GATE CSE 2011 has 2.

How GATE tests Programming in C

More from GATE CSE 2011

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2011 · Q5 · MCQ

A company needs to develop a strategy for software product development for which it has a choice of two programming languages L1 and L2. The number of lines of code (LOC) developed using L2 is estimated to be twice the LOC developed with L1. The product will have to be maintained for five years. Various parameters for the company are given in the table below. Total cost of the project includes cost of development and maintenance. What is the LOC for L1 for which the cost of the project using L1 is equal to the cost of the project using L2? (A) 4000 (B) 5000 (C) 4333 (D) 4667

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.