How about starting with a really simple example.
Code:
#include <stdio.h>

int main(void) {
  int n;
  printf("Enter hex number\n");
  scanf("%x",&n);
  printf("hex +1 = %x\n", n+1);
  return 0;
}
Code:
$ gcc foo.c
$ ./a.out 
Enter hex number
abc1
hex +1 = abc2
$