Contact Learn C
Copy Program Share Program

Program 332: Find First Small Letter in String

Program 332: Find First Small Letter in String
#include<stdio.h>
#include<string.h>
main()
{
 int i,flag=0;
 char str[100];
 printf("Enter String to get First Small Letter of String\n");
 gets(str);
 for(i=0;i<strlen(str);i++)
 {
  if(str[i]>'a' && str[i]<'z')
  {
   printf("The First Small Letter is %c\n",str[i]);
   flag=1;
   break;
  }
 }
 if(flag!=1)
 printf("There is no small letter\n");
}
Explanation:

//Coming Soon...

Output:
Find First Small Letter in String

Find First Small Letter in String

No comments:

Post a Comment

Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide