Beginner programmer here, trying to figure out how to find and print the longest common prefix in C.
I have a base here for the program.
#include <stdio.h>
void findprefix(char *str1, char *str2, char *found);
int main(void) {
char str1[100];
char str2[100];
char found[10] = { '\0' };
printf("\nGive string 1: ");
scanf("