I made a code but for ome reason when i compile it I can type in the strings but then the compiler breaks.
#include <stdio.h>
#include <string.h>
#include <ctype.h>
main(){
char s1[100]={};
char s2[100]={};
gets(s1);
gets(s2);
int zbr;
funkcija(s1[100], s2[100], &zbr);
printf("Zbroj duljina stringova je: %d", zbr);
}
void funkcija(char x1[100],char x2[100], int *pzbr){
int n1=0, n2=0;
n1=strlen(x1);
n2=strlen(x2);
*pzbr=n1+n2;
}
After typing in the strings it says the program has stopped workig and Windows is trying to fix it like when you foget to & put an adress in scanf
.