Question

Consider the following C code: #include #include int main() {     char* text = "The quick brown fox jumps over the lazy dog.";     char* pattern = "fox";     char* result = strstr(text, pattern);     if (result != NUL

  • L {         printf("%ld\n", result - text); // Print index     } else {         printf("-1\n");     }     return 0; } What will be the output of this program?
A 16
B 17
C 18
D 19
E -1
Practice Next

Hey! Ask a query