You are on page 1of 1

#include<stdio.

h>
#include<stdlib.h>
#include<fentl.h>
int main()
{
unsigned int one;
unsigned int two;
unsigned int check;
unsigned int checkresult;

printf("\nEnter the first hex value:");


scanf("%x",&one);

printf("\nEnter the second hex value:");


scanf("%x",&one);

check=one+two;
check=check;

printf("\nThe value of check is:%x",check);


checkresult=one+two+check;

printf("\The value of checkresult:%x",checkresult);


checkresult=checkresult;
printf("\n The value of answer is :%x",check result);
else
printf("\n The check sum of the code generated is not correct");
}
OUTPUT:
[cseb56@localhost cseb56]$ cc che10.c
[cseb56@localhost cseb56]$./a.out
Enter the first hex value : 12345678
Enter the second hex value : 87654321
The value of check is : 66666666
The value of checkresult is : ffffffff
The value of answer is : 0
the check sum of the code generated is correct

You might also like