-
-
Notifications
You must be signed in to change notification settings - Fork 264
[HELP] problem about endianness #207
Copy link
Copy link
Closed
Description
source:
#include <cstdio>
int main()
{
char arr = 0x11;
printf("c=%c\n", arr);
return 0;
} Insight:
#include <cstdio>
int main()
{
char arr = 17;
printf("c=%c\n", static_cast<int>(arr));
return 0;
}my understand that, the output of code above in Little endian machine and Big endian machine not the same, Is it correct?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels