Convert a 4 digit number stored in a global array bcdval[4] in the format of Binary Coded Decimal (BCD) to a 16‐bit integer value stored in global variable ival. Sample of input and output:
char bcdval[4] = {2, 9, 8, 7};
int ival; Gives ival = 0x0BAB