Professional Documents
Culture Documents
Home
Archive
C Programming Examples
Search
29 May 2012
Categories:
C PR O GR AMS DATA STR UC TUR E PR O GR AMS DO YO U KNO W ? PATTER N PR O GR AMMING IN C PATTER N PR O GR AMMING IN C ++
//#include<conio.h> #include<stdio.h> void main() { char str[20]; int i; clrscr(); printf("Enter any String "); scanf("%s",str); for(i=0;str[i]!='\0';i++) { if(str[i]>64&&str[i]<91) // Uppercase characters str[i]=str[i]+32; // adding 32 to change to lowercase else if(str[i]>95&&str[i]<122) // Lowercase characters str[i]=str[i]-32; // substracting 32 to change to Uppercase } printf("Here is the changed case: %s",str); getch(); }
STR INGS
11 follow ers
Popular Posts:
C program to implement circular Queue [using Array] Simple star pattern programs in c c program to concatenate two strings without using strcat [ using pointers] C Program to implement Singly Linked List C program to implement Stack [using Array] String functions in C with examples
1/3