Classful IP Addressing and Casting MCQs: 12 Solved Questions with Explanations

Build a reliable classful IPv4 decision method, then apply it to 12 solved questions covering class recognition, network masks, representation and casting.

KnowledgeGate Team

Exam prep & CS education

Updated 26 Jul 20268 min read

Classful-addressing questions often look like memory tests, but their options mix first-octet ranges, fixed leading bits, default masks, dotted-decimal conversion and casting semantics. Memorising only Class A, B and C can still leave you confusing 192 with 224, treating multicast as broadcast, or accepting an octet above 255.

Work the class first and the address second. Class recognition settles most of these questions, a default mask settles the network-ID ones, and only the casting rules need anything beyond the first octet. The questions below follow that order, closing with unicast, multicast and broadcast.

Every question heading from Question 2 onward links to that question's own solved page; for Question 1, the Classful Addressing basics lesson covers the same ground. Computer Networks MCQs maps the rest of the subject.

Classful IP addressing MCQs: the decision table to use

Class

First-octet range

Fixed leading bits

Default classful mask

Historical use

Class A

0-127

0

255.0.0.0

Unicast networks

Class B

128-191

10

255.255.0.0

Unicast networks

Class C

192-223

110

255.255.255.0

Unicast networks

Class D

224-239

1110

Not applicable

Multicast

Class E

240-255

1111

Not applicable

Experimental or reserved

Treat the table as a classification rule, not a promise that every value is assignable to an ordinary host. The 0 block is reserved, and 127.0.0.0/8 is the loopback block.

For initial classification, convert only the first octet. 123 = 01111011 starts with 0, so it is Class A. 198 = 11000110 starts with 110, so it is Class C. 230 = 11100110 starts with 1110, so it is Class D. Before classifying any dotted-decimal address, also confirm that all four octets are integers from 0 through 255.

These are legacy class boundaries and default masks. Modern routing uses CIDR and is not tied to these fixed class sizes, but classful questions are still graded against the historical rules.

A first-octet ruler from 0 to 255 split into five coloured bands: Class A 0-127, prefix 0, example 123.23.156.4; Class B 128-191, prefix 10, example 180.30.100.10; Class C 192-223, prefix 110, examples 198.78.41.0 and 210.20.30.3; Class D 224-239, prefix 1110, example 230.41.10.20; Class E 240-255, prefix 1111, example 252.5.15.11. A callout at 127 marks 127.0.0.0/8 as loopback.

Classful address recognition: Questions 1-3

Ignore the last three octets during initial class recognition. The first octet, or its fixed leading-bit pattern, settles the class.

Question 1: classify 123.23.156.4

In classful addressing, an IP address 123.23.156.4 belongs to ______ class format

A. Class A

B. Class B

C. Class C

D. Class D

Answer: A. Class A. The first octet, 123, falls in 0-127. Its 8-bit form is 01111011, which starts with the Class A fixed bit 0. Under the legacy default split, the other three octets form the host portion and cannot change the class.

Question 2: classify 198.78.41.0

Indian Space Research Organization 2008

The network 198.78.41.0 is a

A. Class A network

B. Class B network

C. Class C network

D. Class D network

Answer: C. Class C network. The first octet is 198, inside the Class C range 192-223. In binary, 198 = 11000110, so its fixed prefix is 110. The final 0 does not affect this classification.

Question 3: match four addresses to their classes

UGC NET 2024

Match List - I with List - II.

List - I (IP Address)          List - II (Class)
(A) 10.20.30.40                (I) Class E
(B) 210.20.30.3                (II) Class B
(C) 180.30.100.10              (III) Class A
(D) 252.5.15.11                (IV) Class C

Choose the correct answer from the options given below:

A. (A)-(II), (B)-(III), (C)-(I), (D)-(IV)

B. (A)-(I), (B)-(IV), (C)-(II), (D)-(III)

C. (A)-(I), (B)-(II), (C)-(IV), (D)-(III)

D. (A)-(III), (B)-(IV), (C)-(II), (D)-(I)

Answer: D. (A)-(III), (B)-(IV), (C)-(II), (D)-(I). Map each first octet: 10 is Class A, 210 is Class C, 180 is Class B and 252 is Class E. These correspond to III, IV, II, I, respectively, which is option D. No subnet mask is needed.

Class C prefix and endpoint: Questions 4-5

Class C has first-octet range 192-223 and fixed prefix 110. Its boundaries are 11000000₂ = 128 + 64 = 192 and 11011111₂ = 128 + 64 + 16 + 8 + 4 + 2 + 1 = 223. Therefore 223.255.255.255 is the last address in the whole historical Class C block, not necessarily an assignable host in a particular network.

Question 4: identify the Class C leading bits

DSSSB 2018

The class-C IPv4 address must start with ____.

A. 10

B. 101

C. 110

D. 011

Answer: C. 110. Class C fixes the first three bits as 110; the remaining five first-octet bits may vary. The resulting span is 11000000₂ through 11011111₂, or decimal 192 through 223.

Question 5: locate the last Class C address

UGC NET 2019

Which of the following class of IP address has the last address as 223.255.255.255?

A. Class A

B. Class B

C. Class C

D. Class D

Answer: C. Class C. The first octet 223 is the largest value whose leading bits remain 110, so this address closes the historical Class C block. The next first octet, 224, starts with 1110 and enters Class D multicast space.

Default classful masks and network IDs: Questions 6-7

The three legacy defaults are Class A /8 = 255.0.0.0, Class B /16 = 255.255.0.0, and Class C /24 = 255.255.255.0. During bitwise AND, a mask octet of 255 retains the corresponding address octet, while 0 clears it.

Question 6: recall the Class B default mask

UP Police 2016

The default subnet mask for Class B IP addresses is:

A. 255.0.255.0

B. 255.255.255.0

C. 255.255.0.0

D. 0.0.255.255

Answer: C. 255.255.0.0. A default Class B split assigns the first 16 bits to the network and the final 16 to the host. Sixteen 1 bits followed by sixteen 0 bits become 255.255.0.0 in dotted decimal.

Question 7: extract the network ID from 192.168.10.51

UP Police 2013

What part of 192.168.10.51 is the Network ID, assuming a default subnet mask?

A. 192

B. 192.168.10

C. 0.0.0.51

D. 51

Answer: B. 192.168.10. The first octet 192 makes this Class C, so use 255.255.255.0. The operation is 192.168.10.51 AND 255.255.255.0 = 192.168.10.0. The options ask for the network-ID part, the first three octets 192.168.10; 51 is the host part.

Once these defaults are comfortable, use Subnetting MCQs: 12 Solved IP Addressing Questions to practise non-default prefixes.

IPv4 validity and binary conversion: Questions 8-9

Apply the four-octet range check before any class rule. For conversion, handle each binary octet independently with place values 128, 64, 32, 16, 8, 4, 2, 1.

Question 8: reject an out-of-range octet

Kendriya Vidyalaya Sangathan 2023

Which of the following is an invalid IP address?

A. 100.0.10.32

B. 255.255.255.10

C. 192.168.10.15

D. 256.10.12.5

Answer: D. 256.10.12.5. An IPv4 octet has eight bits, so its range is 0 to 2^8 - 1 = 255. The value 256 needs nine bits and is invalid in dotted-decimal IPv4. This check concerns representation; it does not make every syntactically valid address an ordinary assignable host address.

Question 9: convert four binary octets

UGC NET 2018

The dotted-decimal notation of the following IPV4 address in binary notation is _________. 10000001 00001011 00001011 11101111

A. 111.56.45.239

B. 129.11.10.238

C. 129.11.11.239

D. 111.56.11.239

Answer: C. 129.11.11.239. Calculate each octet: 10000001₂ = 128 + 1 = 129; each 00001011₂ = 8 + 2 + 1 = 11; and 11101111₂ = 128 + 64 + 32 + 8 + 4 + 2 + 1 = 239. Joining the four values gives 129.11.11.239.

Unicast, multicast and broadcast: Questions 10-12

Unicast targets one interface, multicast targets a selected group, and broadcast targets every host in the broadcast scope. Anycast routes to one suitable member of a group. Legacy IPv4 Class D covers 224.0.0.0 through 239.255.255.255 for multicast. IPv6 supports unicast, multicast and anycast, but not broadcast.

Question 10: identify the Class D range

Indian Space Research Organization 2007; BEL 2007

Range of IP Address from 224.0.0.0 to 239.255.255.255 are

A. Reserved for loopback

B. Reserved for broadcast

C. Used for multicast packets

D. Reserved for future addressing

Answer: C. Used for multicast packets. First octets 224 through 239 share prefix 1110, identifying the historical Class D block. Class D names multicast groups. Loopback uses 127.0.0.0/8, while the next historical block beginning at 240 is Class E.

Question 11: choose the IPv6 mode that is absent

Indian Space Research Organization 2013

IPv6 does not support which of the following addressing modes?

A. unicast addressing

B. multicast addressing

C. broadcast addressing

D. anycast addressing

Answer: C. broadcast addressing. IPv6 defines unicast, multicast and anycast, but no broadcast address type. Scoped multicast groups handle functions that might have used broadcast in IPv4, so C is the only absent mode.

Question 12: find the false casting statement

DSSSB 2018

Which of the following statement is FALSE?

A. A source address is always unicast

B. A destination address can be unicast, multicast, or broadcast

C. The multicast address is the special case of the broadcast address in which all the bits are 1

D. The most significant bit(s) of the first byte determines the class of the address

Answer: C. The multicast address is the special case of the broadcast address in which all the bits are 1. Check each statement. A packet source identifies one sender; an IPv4 destination can be unicast, multicast or broadcast; and legacy classful recognition uses the most significant first-octet bits. C confuses separate concepts: the all-ones address 255.255.255.255 is the limited IPv4 broadcast address, while multicast uses 224.0.0.0-239.255.255.255.

Classful addressing and casting MCQs: the short version

Use this five-step check:

  1. Validate all four octets.

  2. Inspect the first octet.

  3. Map it to a class range or fixed prefix.

  4. Apply the legacy default mask only when the question says classful or default.

  5. Distinguish one receiver, a selected group and all hosts for unicast, multicast and broadcast.

Examiners come at this topic four ways: class recognition (Questions 1-5), the default network split (Questions 6-7), dotted-decimal representation (Questions 8-9) and casting semantics (Questions 10-12). For broad subject revision, use GATE CS Exam Preparation.

If this is your only weak area, first redo all 12 questions without the decision table. For structured Computer Networks study across the syllabus, continue with GATE Guidance by Sanchit Sir.