Question:
What is the C analogue of Python's ord ('x')?
ord ('x') gives 120.
Answer:
No (int)'x'
needed :
#include <stdio.h>
int x = 'x';
int main(void) {
printf("%d %d\n", x, 'x');
return 0;
}
What is the C analogue of Python's ord ('x')?
ord ('x') gives 120.
No (int)'x'
needed :
#include <stdio.h>
int x = 'x';
int main(void) {
printf("%d %d\n", x, 'x');
return 0;
}