Why is char often treated as integer data type?

1 answer

Answer

1252808

2026-07-27 13:50

+ Follow

The char data type is an integral type and can therefore be used to represent integers as well as characters. However, in order to treat the representation as an actual integer, it must be explicitly converted to a non-character type, such as int.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.