PPS Practical 41
- Aim: Write a program to convert string into upper case.
- Code:
//For turbo C++ remove below comments #include <stdio.h> //#include<conio.h> #include<string.h> void main() { char s[99]; int i; //clrscr(); printf("Enter string : "); gets(s); for ( i = 0; s[i] !='\0'; i++){ if (s[i]>='a' && s[i]<='z'){ s[i]-=32; } } printf("Resulted string : %s",s); // getch(); }
- Output:
Comments
Post a Comment