Answer : (B) Aldehyde group and hydroxyl group at C-5
Step 1 — Identify the functional groups present in glucose
Glucose is an aldohexose : it has a $-CHO$ group at C-1 and hydroxyl groups on C-2 to C-6. It has no ketone group, so options (C) and (D) are ruled out immediately.
Step 2 — Understand what "pyranose" means
Pyranose means a six-membered ring (five carbons + one oxygen), named after the pyran ring.
Step 3 — Decide which $-OH$ must react
The ring oxygen comes from the reacting $-OH$. For a six-membered ring the ring must contain C-1, C-2, C-3, C-4, C-5 and the oxygen — that means the $-OH$ on C-5 attacks the $-CHO$ at C-1.
Step 4 — Note the contrast
If the $-OH$ at C-4 reacted instead, the ring would contain only C-1 to C-4 plus oxygen, i.e. a five-membered furanose ring.
Step 5 — Conclude
The C-1 aldehyde and the C-5 hydroxyl combine to give the cyclic hemiacetal, producing $\alpha$- and $\beta$-D-glucopyranose.