FIND THE NO OF CHARACTERS IN NAME
Problem Description
Manoj arranged one event to find no of characters in his friends name, your idea is to give your friends name, for that
manoj has to answer the no of characters present in it, with the help of sturcuture concept accomplish it.
Input Method
Name of different friends
Output Method
No of characters
Mandatory:
Use Structure Concepts
CODING ARENA
#include <stdio.h>
#include <string.h>
struct name
{
char str[10];
}s;
int main()
{
int len;
char str[10];
scanf("%s",str);
struct name;
len=strlen(str);
printf("%d",len);
return 0;
}
Test Case 1
Input (stdin)raja
Expected Output
4
Test Case 2
Input (stdin)rambabu
Expected Output
7
No comments:
Post a Comment