#include<stdio.h>
#include<conio.h>
void main()
{
char a[10],a1[10];
int i,j,n;
clrscr();
printf("\n Please Give The Value of N: ");
scanf("%d",&n);
for(i=0;i<n;i++)
{
flushall();
printf("\n enter value of a[%d] :",i);
scanf("%c",&a[i]);
if(a[i]>=97 && a[i]<=122)
{
a1[i]=a[i]-32;
printf("\n NOW IN UPPERCASE %c ",a1[i]);
}
if(a[i]>=65 && a[i]<=90)
{
a1[i]=a[i]+32;
printf("\n NOW IN LOWERCASE %c ",a1[i]);
}
}
printf("\n\nTHE TOTAL STRING IS ");
for(i=0;i<n;i++)
printf("%c",a1[i]);
getch();
}
********************* OUTPUT ************************************************
Please Give The Value of N: 4
enter value of a[0] :A
NOW IN LOWERCASE a
enter value of a[1] :L
NOW IN LOWERCASE l
enter value of a[2] :A
NOW IN LOWERCASE a
enter value of a[3] :Y
NOW IN LOWERCASE y
THE TOTAL STRING IS alay
***********************************************************************