In C, the size of a long
can vary depending on the system architecture. Typically, on a 32-bit system, a long
is 32 bits (4 bytes), while on a 64-bit system, it is usually 64 bits (8 bytes). However, the C standard only guarantees that a long
is at least 32 bits. You can use the sizeof
operator to determine the exact size in bytes on your specific platform.
3 bits
Thirty bits make up the network portion of a class C address. Three bits are borrowed for the subnet mask. There is also a class A and a class B that are comprised of bits.
For the most part, how many bits in a floating point number. More bits = greater precision.
24 bits (8 bits per octet, so 3) are used for the network portion of a class C IP address
8*sizeof (long), usually 32 or 64
Borrow 5 bits (for 30 subnets total).
Class C (192-223) In Class C there is 3 network bits and one host bit.
It depends on the type of integer (such as long, short, int and char) and the specific implementation of C++. The only guarantee is that a char must occupy one byte (sizeof(char)==1). An int is typically 32-bits (4 bytes), but only sizeof(int) can tell you for sure.
10 bits would be required. 10 bits long (10 digits long) can represent up to 1024.
Given a Class C network: 200.1.1.0 We want 5 subnets, each with 30 hosts on it. How many bits to borrow ? How many bits to leave? What is the subnet mask? ( in dot notation and in CIDR notation)
15 or 16.
20