Very new to C and wondering what do i need to do to finish off three expected identifier errors
// char2int
// Converts from a character to an integer digit
// if character '0'..'9' convert to 0..9
// else if character 'A'..'F' convert to 10..15
// else convert to -1
int char2int(char digit);
{
//int char2IntResult = digit;
//char char2CharResult = digit;
//if the digit is 9 - 0, result variable will subtract '0' from digit
int if (digit < 'A' & digit >= 0)
int char2IntResult = digit - '0';
return &char2IntResult ;
//if the digit is 10-15 result variable will subtract '0' from digit'
char if (digit >= 'A' & digit <= 'F')
char char2CharResult = digit - '0';
return &char2CharResul t;
int else
return -1;
}
// int2char
// Converts from an integer digit to a character
// if integer 0..9 convert to '0'..'9'
// else if integer 10..15 convert to 'A'..'F'
// else convert to 'X'
char int2char(int digit);
{
//int int2CharDigit = digit;
//char int2CharChar = digit;
//If digit is 0-9, result variable will convert to 0-9
int if (digit < 'A' & digit >= 0)
int int2CharDigit = digit + '0';
return &int2CharDig it;
// Else if digit is 10-15, result variable will convert to A-F
char if (digit < 'F' & digit >= 'A')
char int2CharChar = digit + '0';
return &int2CharCha r;
char else
return 'X';
}
// Convert integer to string in specified base and print
// 2 <= base <= 16
void int2ascii(int value, int base);
{
int (return -1);
}
// Convert string in specified base to integer and print
// 2 <= base <= 16
void ascii2int(char *ascii, int base);
// char2int
// Converts from a character to an integer digit
// if character '0'..'9' convert to 0..9
// else if character 'A'..'F' convert to 10..15
// else convert to -1
int char2int(char digit);
{
//int char2IntResult = digit;
//char char2CharResult = digit;
//if the digit is 9 - 0, result variable will subtract '0' from digit
int if (digit < 'A' & digit >= 0)
int char2IntResult = digit - '0';
return &char2IntResult ;
//if the digit is 10-15 result variable will subtract '0' from digit'
char if (digit >= 'A' & digit <= 'F')
char char2CharResult = digit - '0';
return &char2CharResul t;
int else
return -1;
}
// int2char
// Converts from an integer digit to a character
// if integer 0..9 convert to '0'..'9'
// else if integer 10..15 convert to 'A'..'F'
// else convert to 'X'
char int2char(int digit);
{
//int int2CharDigit = digit;
//char int2CharChar = digit;
//If digit is 0-9, result variable will convert to 0-9
int if (digit < 'A' & digit >= 0)
int int2CharDigit = digit + '0';
return &int2CharDig it;
// Else if digit is 10-15, result variable will convert to A-F
char if (digit < 'F' & digit >= 'A')
char int2CharChar = digit + '0';
return &int2CharCha r;
char else
return 'X';
}
// Convert integer to string in specified base and print
// 2 <= base <= 16
void int2ascii(int value, int base);
{
int (return -1);
}
// Convert string in specified base to integer and print
// 2 <= base <= 16
void ascii2int(char *ascii, int base);
Comment