Hey guys, I have a problem with this code not compiling. The compiler says that the bolded line is an invalid conversion from void to char but I don't understand why this won't work. Thanks all!
Code:#include <stdio.h> #include <stdlib.h> #include <string.h> void quiz(char *s); void quiz(char *s) { char *t = malloc(strlen(s) + 1); char *p = t; while (*s) { if (!('a' <= *s && *s <= 'z')) { *p = *s; p++; } s++; } *p = '\0'; printf("%s",t); } int main() { char array[] = "I heart CS262"; quiz(array); return 0; }