C provides a strlen() function to find length of a String. Example : #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { char* str1 = "topjavatutorial.com"; printf("Length of str1 is %d", strlen(str1)); return EXIT_SUCCESS; } Output : Length of str1 is 19 © 2017, https:. All rights reserved. On republishing this post, you must provide …
Continue reading How to find length of a String in CC
C lanuguage provides following string to number conversion programs in stdlib.h atoi : Converts a string to an integer atof : Converts string to floating point number Here is an example : /* ============================================================================ Name : Hello.c Author : Version : Copyright : TopJavaTutorial.com Description : Hello World in C, Ansi-style ============================================================================ */ #include <stdio.h> #include …
Continue reading Converting string to int or float in C