Posts by luisp-29 • 9 points
2 posts
-
-1
votes1
answer54
viewsQ: Pointer cast
void *ft_memchr(const void *s, int c, size_t n) { while (n > 0) { if (*(unsigned char *) s == c) { return ((void *)s); } s++; n--; } return (NULL); } What would this be *(unsigned char *)s? I…
-
0
votes2
answers76
viewsQ: Problem in the scanf, infinite loop
When I put a char on scanf the program printa lot of "height" and does not give me the chance to choose another value, only enters an infinite loop. Code: int main() { int result; while(result <…