KodeGod.com

087. Write a program to convert given string to UPPER CASE in C language

#include<stdio.h>
#include<conio.h>  
main()
{
	int i;
	char *s1;
	clrscr();
	printf("Enter the string 1....");
	scanf("%s",s1);

	for(i=0;s1[i]!='\0';i++)
	{
		if((s1[i]>='a')&&(s1[i]<='z'))
			s1[i]=s1[i]-32;
	}
	printf("Resultant string is...%s",s1);
	getch();
}