Questions tagged [type-casting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
370 views

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 ...