Thursday, 13 October 2016

program to uppercase a string or word without using strupr() function

#include<stdio.h>
#include<string.h>
int main()
{
char a[10],b[10];
int i,j[10],len;
printf("enter first  the string");
gets(a);
 
for(i=0;a[i]!='\0';i++)
{
if(a[i]>='a'&&a[i]<='z')
{
a[i]=a[i]-32;
}
}
printf("the upper string is :");
puts(a);
}

No comments:

Post a Comment