Hi there I am trying to print out all ASCII signs on my macbook.
This is the code I made:
When i gcc it and then runs it, this is the prints i get:
(ill just show the last)
HEJSAN ? = 244
HEJSAN ? = 245
HEJSAN ? = 246
HEJSAN ? = 247
HEJSAN ? = 248
HEJSAN ? = 249
HEJSAN ? = 250
HEJSAN ? = 251
HEJSAN ? = 252
HEJSAN ? = 253
HEJSAN ? = 254
HEJSAN ? = 255
Signs up until 127 works but everything after that is printed as "?", why is that? Asked a couple of friends and none of them has this problem with their macbook.
Best regards
Alex
This is the code I made:
Code:
#include "test.h"
#include <stdlib.h>
#include <stdio.h>
int main()
{
unsigned int i;
for(i = 0; i <= 255; i++){
unsigned char c = i;
printf("HEJSAN %c = %d \n",c,c);
}
return;
}
When i gcc it and then runs it, this is the prints i get:
(ill just show the last)
HEJSAN ? = 244
HEJSAN ? = 245
HEJSAN ? = 246
HEJSAN ? = 247
HEJSAN ? = 248
HEJSAN ? = 249
HEJSAN ? = 250
HEJSAN ? = 251
HEJSAN ? = 252
HEJSAN ? = 253
HEJSAN ? = 254
HEJSAN ? = 255
Signs up until 127 works but everything after that is printed as "?", why is that? Asked a couple of friends and none of them has this problem with their macbook.
Best regards
Alex