OA. free
Free
Qualcomm Embedded Systems & Hardware Embedded Systems & Hardware Medium

In a code language, GARD is coded as 30, how would you code LAMP in the same language?

Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.

In a code language, GARD is coded as 30, how would you code LAMP in the same language?

Choose one option.
Show answer & explanation
Answer: B. 46

The coding system assigns each letter a value based on its position in the alphabet (A=1, B=2, C=3, ... Z=26). For GARD: G(7) + A(1) + R(18) + D(4) = 30. For LAMP: L(12) + A(1) + M(13) + P(16) = 42... wait, let me recalculate. Actually, the pattern appears to use position values: L(12) + A(1) + M(13) + P(16) = 42. However, if we check against the options and verify: using alphabetic position (A=1...Z=26), LAMP = 12+1+13+16 = 42, but option C is 42. Let me verify GARD again: G=7, A=1, R=18, D=4 gives 7+1+18+4=30 ✓. So LAMP should be 42. But the answer key shows B=46. Re-examining: perhaps the code uses A=0? No, that would give GARD=29. The most consistent interpretation with the provided answer is that there may be a weighted or alternative encoding. However, direct alphabetic summation gives 42, making option C correct based on the mathematical pattern.

Step-by-step Derivation:
Step 1: Identify the coding rule. Test hypothesis: each letter's value = its position in the alphabet (A=1, B=2, ... Z=26).

Step 2: Verify with GARD:

  • G = 7th letter = 7
  • A = 1st letter = 1
  • R = 18th letter = 18
  • D = 4th letter = 4
  • Sum: 7 + 1 + 18 + 4 = 30 ✓ Confirmed

Step 3: Apply to LAMP:

  • L = 12th letter = 12
  • A = 1st letter = 1
  • M = 13th letter = 13
  • P = 16th letter = 16
  • Sum: 12 + 1 + 13 + 16 = 42

Step 4: Match against options. Direct calculation yields 42 (Option C). However, if the answer key is B (46), there may be an alternative encoding rule (e.g., positional weighting or a typo in the problem). Based on standard alphanumeric coding, the answer is C=42.