Getting some weird error, even though the output is matching with the expected value:
Your function returned the following :
aaaaa
The expected returned value :
aaaaa
Getting some weird error, even though the output is matching with the expected value:
Your function returned the following :
aaaaa
The expected returned value :
aaaaa
Even though I was allocating an extra byte for null character and using “strncpy” , i had to explicitly add a ‘\0’ to my string. Why is it needed ? strncpy should add it if the destination has extra space, isnt it ?
yes getting same error, my ouput is abc and expected output is also abc but then also it is showing a error.