How many squares are there in the figure given below?

Answer & explanation
Correct answer: option 3
The correct answer is Option (3) → 40
The figure is a grid of 5 × 4 small squares. A square of side \(k\) small squares can start at \(6-k\) places across and \(5-k\) places down.

1 × 1 squares: \(5\times4=20\)
2 × 2 squares: \(4\times3=12\)
3 × 3 squares: \(3\times2=6\)
4 × 4 squares: \(2\times1=2\)
Total \(=20+12+6+2=40\) squares.
Why the other options are incorrect
Option (1) 20 — Incorrect. This counts only the 20 smallest squares.
Option (2) 38 — Incorrect. This leaves out the 2 4 × 4 squares.
Option (4) 28 — Incorrect. This leaves out the 12 2 × 2 squares.