Interview answers verified by specialists.

Find interview questions and answers on this website:

See right interview answers on 30 common job interview questions

Are bit fields portable?

Bit fields are not portable. Because bit fields cannot span machine words, and because the number of bits
in a machine word is different on different machines, a particular program using bit fields might not even
compile on a particular machine.

Assuming that your program does compile, the order in which bits are assigned to bit fields is not defined.
Therefore, different compilers, or even different versions of the same compiler, could produce code that
would not work properly on data generated by compiled older code. Stay away from using bit fields, except
in cases in which the machine can directly address bits in memory and the compiler can generate code to take
advantage of it and the increase in speed to be gained would be essential to the operation of the program.

Do you know that?

83% freelancers are paid after the agreed-upon date Next


Getting payments for Freelancers
1. Read how to register and get earned money

2. Open account within 5 minPayoneer sing up to get free $25