This looks like a very strange program to me. Some comments and recommendations.
1. Don't do that exit(0) in the case. If you just put a break in that
case, it will also finish the switch structure.
2. If isxdigit is a function, doesn't it need to have some input
variable(s)?
3. Don't do that return 0 when case 1, a break is all you need.
4. You need a number between 1 and 4? Then you will also
need cases for that.
5. I would use an if-structure for this problem.
6. Why use while(1), this is an endless loop.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int main(int argc, char *argv[])
{
int reply;
puts("\n*********************************************");
puts("\n");
puts("\nEnter a menu number selection between 1 and 4, 0 to exit: ");
puts("\n");
puts("\n*********************************************");
scanf("%d", &reply);
if (reply > 0 && reply < 5)
{
int a, b, c;
printf ("Two numbers please.\n");
scanf ("%x%x", &a, &b);
if (isxdigit (a) && isxdigit (b))
{
c = a + b;
printf ("%X", c);
}
else
{
printf ("Hex please\n");
}
}
else
{
printf ("Nr. between 1 and 4 please\n");
}
return 0;
}
Note that I'm not sure about isxdigit-function. Never used that.