CONVERT A LOWER CASE CHARACTER INTO UPPER CASE IN AN ARRAY


#include<stdio.h>
#include<conio.h>
void main()
{
char A[100],ch;
int n,i,p=0;
clrscr();
printf("enter the size of array");
scanf("%d",&n);
printf("enter the desired value\n");
for(i=0;i<n;i++)
{
fflush(stdin);
scanf("%c",&A[i]);
}
for(i=0;i<n;i++)
{ p=A[i];
  if(p>=97&&p<=122)
  p=p-32;
ch=(char)p;
printf("%c\n",ch);
}
getch();
}

SIMPLE PROGRAMS
FUNCTIONS


NUMBERS


STRINGS AND CHARACTERS

Comments