Early IPv4 split addresses into fixed classes so routers could tell the network part from the host part by the first bits. You still need the classes to answer exam MCQs and to recognise private and special ranges. Do not use classes to design a real network today; CIDR replaced them because fixed sizes wasted huge numbers of addresses. Questions usually give an address and ask its class or default mask.