hahahaha i'm sorry i didn know WACP wud coz such confusion...@salem yeah ur ryt it is Write a C Program... hey ppl thanks for the help... i finally did manage to come up with the code but its still generating errors please have a look.
Code:
#include<stdio.h>
#include<conio.h>
#include<math.h>
void low_up(int);
void main()
{
char ch[4];
int temp[4],i;
clrscr();
printf("Enter a hexadecimal number");
for(i=0;i<4;i++)
{
scanf("%c", &ch[i]);
temp[i]=ch[i];
}
if((ch[i]>='a' && ch[i]<='f')||(ch[i]>='A' && ch[i]<='F'))
{
printf("This is a hexadecimal number");
}
low_up(&temp);
for(i=0;i<4;i++)
printf("%d\n", temp[i]);
else
printf("this is not a hexadeimal number");
getch();
}
void low_up(int *j)
{
int k;
for(k=0;k<4;k++)
{
if(*j>=97 && *j<=102)
*j=*j - 32;
else if(*j>=65 && *j<=70)
*j=*j + 32;
j++;
}
for(i=0;i<4;i++)
{
printf("%c", *j);
j++;
}
}