- a. uint8_t hexStringToUint8(const char * str)
// convert the null-terminated string (str) to an unsigned 8-bit integer
// treat the string as representing a hexadecimal number
// if a character other than 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, or F is present or the value is too large, return 0.
b. int32_t findCityAligned (const char city[], const BUSINESS7 business[], uint32_t count)
// returns the index of the first entry in the array (business) containing count entries which matches the requested city. If the city is not found, return a value of -1. You can assume that C default alignment is used for this problem.
c. int32_t findCityPacked (const char city[], const BUSINESS7 business[], uint32_t count)
// returns the index of the first entry in the array (business) containing count entries which matches the requested city. If the city is not found, return a value of -1. You can assume that C packing is used for this problem.


0 comments