Hello friends!!!!!
To print length of the string
C LANGUAGE
11/26/20241 min read
// To print No. of characters present in the string
#include <stdio.h>
#include<string.h>
int main() {
char a[] = "Rishendra Ruppa";
printf("Given string is - %s\n", a);
// strlen - get the length of the string
printf("The length of the string is - %lu", strlen(a));
}
Output:
Given string is - Rishendra Ruppa
The length of the string is - 15
=== Code Execution Successful ===