Let \[{\rm{g}}\left( {\rm{x}} \right) = \left\{ {\begin{array}{*{20}{c}} { – {\rm{x,}}}&{{\rm{x}} \le 1}\\ {{\rm{x}} + 1,}&{{\rm{x}} \ge 1} \end{array}} \right.\] and \[{\rm{f}}\left( {\rm{x}} \right) = \left\{ {\begin{array}{*{20}{c}} {1 – {\rm{x,}}}&{{\rm{x}} \le 0}\\ {{{\rm{x}}^2},}&{{\rm{x}} > 0} \end{array}} \right..\] Consider the composition of f and g i.e. (fog) (x) = f(g(x)). The number of discontinuities in (fog) (x) present in the interval (\[ – \infty ,\] 0) is: A. 0 B. 1 C. 2 D. 4

0
1
2
4

The correct answer is $\boxed{\text{B}}$.

The function $f(x)$ is continuous for all real numbers, and the function $g(x)$ is continuous for all real numbers greater than or equal to 1. However, $g(x)$ is not continuous for $x=1$, since the two-sided limit $\lim_{x\to 1}g(x)$ does not exist.

The composition of two functions is continuous if and only if both functions are continuous and the point of composition is not a point of discontinuity for either function. In this case, the composition of $f$ and $g$ is continuous for all real numbers except for $x=1$. Therefore, the number of discontinuities in $(fog)(x)$ present in the interval $(-\infty, 0)$ is $\boxed{1}$.

To see this more clearly, let’s graph the functions $f$ and $g$.

[asy]
unitsize(1 cm);

draw((0,-1.2)–(0,1.2),Arrows);
draw((-1.2,0)–(1.2,0),Arrows);

real ticklen=0.1;
real tickspace=0.2;

label(“$x$”,(1.2,0),SE);
label(“$y$”,(0,1.2),NW);

real g(real x) {
if (x <= 1) {
return -x;
} else {
return x+1;
}
}

real f(real x) {
if (x <= 0) {
return 1-x;
} else {
return x^2;
}
}

draw(graph(g,-1.2,1.2),red);
draw(graph(f,-1.2,1.2),blue);

draw((0,-1)–(0,1),dashed);
draw((1,0)–(1,1),dashed);

dot(“$1$”,(1,0),SE);
[/asy]

The graph of $g$ is a line segment with a break at $x=1$. The graph of $f$ is a parabola that intersects the graph of $g$ at $x=0$. The composition of $f$ and $g$ is the graph of $f$ restricted to the range of $g$, which is the interval $(-\infty, 1]$. The graph of $(fog)(x)$ is shown in green.

As you can see, the graph of $(fog)(x)$ is continuous for all real numbers except for $x=1$. Therefore, the number of discontinuities in $(fog)(x)$ present in the interval $(-\infty, 0)$ is $\boxed{1}$.