Correct option: A.$\begin{array}{*{20}{c}}
A&B&X\\
0&0&0\\
0&1&1\\
1&0&1\\
1&1&0
\end{array}$
a
First we consider the output $C$ of the $NAND$ gate:
$\begin{array}{*{20}{c}}
A&B&C\\
0&0&1\\
0&1&1\\
1&0&1\\
1&1&0
\end{array}$
Next we consider the state $D$ which is the output of an $AND$ gate operating on $A$ and $C:$
$\begin{array}{*{20}{c}}
A&B&C&D\\
0&0&1&0\\
0&1&1&0\\
1&0&1&1\\
1&1&0&0
\end{array}$
Similarly, $E$ is the output of an $AND$ gate operating on $B$ and $C:$
$\begin{array}{*{20}{c}}
A&B&C&D&E\\
0&0&1&0&0\\
0&1&1&0&1\\
1&0&1&1&0\\
1&1&0&0&0
\end{array}$
Finally, the output $X$ is the result of an $OR$ gate operating on $D$ and $E:$
$\begin{array}{*{20}{c}}
A&B&C&D&E&X\\
0&0&1&0&0&0\\
0&1&1&0&1&1\\
1&0&1&1&0&1\\
1&1&0&0&0&0
\end{array}$
We recoginise this as the exclusive - or $(XOR)$ function.
