4381bb2a22
When the execution reaches the end of the main functions, they implicitly return a successful status.
9 lines
231 B
C
9 lines
231 B
C
#include <string.h>
|
|
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
printf("%s\n", strchr("hello", 'e')); // should be ello
|
|
printf("%s\n", strchr("world", 'l')); // should be ld
|
|
printf("%i\n", strchr("world", 0) == NULL); // should be 1
|
|
}
|