Firmware developer co op Interview Questions |

Firmware developer co op Interview Questions


firmware developer co op interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

A long binary bit string is stored in a char array (size 128), write a function, given the char array and a number N, return a char array that has the original binary bits shifted by N bits.

1 Answer

void shiftArray(char input[], int N){ int i; char* sample = malloc(sizeof(input) - N); for ( i = 0; i < sizeof(sample); i++ ){ sample[i] = input[N + i]; } memset(input, sizeof(input), 0); for(i = 0; i < sizeof(sample); i++){ input[N + i] = sample[i]; } free(sample); return; }

12 of 2 Interview Questions