Questions tagged [type-casting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

Typecasting with Modulo in Greedy

I'm having trouble getting the the modulo function to work in greedy using this code int result = 0.0; printf("SHOW ME WHAT YOU GOT: "); float paid = GetFloat(); while (paid >= 0.25) { ...
K. Roe's user avatar
  • 19
1 vote
2 answers

Why do we not get a warning when passing a string where we should pass an int?

If we try something like char *str = "hello"; if (isalpha(str)) printf("%s\n", str); we'd get a segmentation fault, because isalpha() takes int whose value must be in the range of an unsigned ...
kzidane's user avatar
  • 17.6k