I have written following c code to update the char array rb but it is printing garbage value
#include <stdio.h>
void update(char* buff){
char word[] = "HII_O";
buff = word;
return;
}
int main(){
char rb[6];
update(rb);
rb[5] = '\0';
printf("[%s]\n",rb);
return 0;
}
The restriction is we can't use any other library. So how to solve this