Char has a capacity of 2 bytes which is 16 bits. However, at the end the teacher states that 68000 will be converted by ignoring the first 16 bits and using the rest as the reference. Char has a max capacity of 16 bits. Is this a mistake in this lecture? It would help me a lot if you could show me the working for conversion.
How will (char)68000 work?
Here’s what I thought. Since 68000 is an int, it will have a capacity of 4 bytes which is 32 bits. Thus, while converting to char it will ignore the first 16 bits and consider the next 16 bits (which is equal to the char capacity) to assign a char value.
@sinuscoupon0s_4659768f9d9b587e Yes Since The int is of size 4bytes that why it will consider only last 16bits and will ignore first 16bits.