GATE CS 2016, set 2 · Question 10 · General Aptitude · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

Choose the correct expression for f(x) given in the graph.

Line graph of f(x) against x. The horizontal axis is labelled x and marked at -4, -3, -2, -1, 0, 1, 2, 3, 4. The vertical axis is labelled f(x) and marked from -2.5 to 2.5 in steps of 0.5, with horizontal gridlines at each step. The plotted piecewise-linear curve starts at the point (-3, -2) and rises in a straight line with slope 1, passing through (-1, 0) and (0, 1), to a peak at (1, 2). From the peak it falls in a straight line with slope -1 to end at (3, 0). The graph is an inverted V shape with its vertex at (1, 2).
  1. (A) f(x) = 1 - |x - 1|
  2. (B) f(x) = 1 + |x - 1|
  3. (C) f(x) = 2 - |x - 1|
  4. (D) f(x) = 2 + |x - 1|
Answer

Answer (C)

Answer from the official GATE CS 2016 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes