Problem Description
Program which will accept string from the user and find the length of the stringCODING ARENA
#include <stdio.h>
#include<string.h>
int main()
{
char name[10];
int n;
scanf("%s",name);
n=strlen(name);
printf("%d",n);
return 0;
}
Test Case 1
Input (stdin)welcome
Expected Output7
Test Case 2
Input (stdin)input
Expected Output5
No comments:
Post a Comment