I have a question regarding pointers. Let's say I pass a character array through a function parameter as a constant pointer as such:
given function declarationCode:void main(void) { char disk[10]; // some code until usart_str_write(disk); // some more code } void usart_str_write(const char* string) { while (*string != "\0") { Usart_Write(*string); string++; } }
In usart_str_write, should I do anything to make the pointer *string derefence back to the initial character, although I won't be doing any more tasks with it?Code:char Usart_Write(char data);
Thanks.



LinkBack URL
About LinkBacks


