/*WAP to find length of string using strlen() function */
#include<stdio.h>
#include<conio.h>
main( )
{
char arr[ ] = "codezworld" ;
int len1, len2 ;
len1 = strlen ( arr ) ;
len2 = strlen ( "A blog of programs" ) ;
printf ( "\nstring = %s length = %d", arr, len1 ) ;
printf ( "\nstring = %s length = %d", "A blog of programs", len2 ) ;
}
No comments:
Post a Comment