mistake in String Functions: The string.h Library | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

mistake in String Functions: The string.h Library

at the code in second slide of String Functions(""The string.h Library""), there is this line: printf("Length of s1 is %d\n", strlen(s1)); it's a mistake, becouse strlen gives size_t ( unsigned long ), so you need this: printf("Length of s1 is %ld\n", strlen(s1)); (%ld insted of %l) to work properly

25th Dec 2019, 11:16 AM
Viktor Pašek
Viktor Pašek - avatar
0 Answers