I\'m new with c and want to separate string in two parts. Here is my code:
#include
#include
#include
void tes
The array-subscript-operator []
has higher precedence then the dereferencing operator *
.
So you want to change
*a[3] = ...
to be
(*a)[3] = ...
Same for b
.
Having set the compiler's warning level high enough, it should have warned you about this. Or at least told you that their is something fishy with
*a[3] = '\0';