The class C network has less than 254 hosts connected to it. As a result, the class C network mask is ideal for small networks, often known as subnetworks. For mask construction, we use the bits from class C's last octet. As a result, we must reorganize and optimize the subnet based on the availability of bits.
Assume your network ID/IP address is 192.168.1.0.
255.255.255.0 is the default subnet mask (in decimal)
11111111.11111111.11111111.00000000 is the default subnet mask (in binary)
As a result, the total number of bits is 8+8+8+0=24 bits. As previously stated, we shall borrow bits from the host component of the subnet mask for subnetting in a class C network.