Hey guys I have a function that looks like this:int check(const char str[])
I am trying to count the size of the string length using strlen but it keeps giving me a segmentation error. Does anyone know why this is happening and how I can fix this?
Code:#include <stdio.h> #include <string.h> int check(const char str[]) { int a; a=strlen(str) if(a==10) { /*execute this block of code */ } }