return char array

a few things to explore:

where is setup()?

C[0,1,2]=data(A);  // send a byte and return char have you ever seen arrays being accessed that way in C++?

B[0]="a";
B[1]="b";
B[2]="c";

is "a" a char or a string? (think what is 'a' versus "a" for the compiler).

 char B[3];
char C[3];
C = B; // <== do you think that in C++ this copies the B array into C?

I would suggest you start going back to the basics of the programming language syntax and capabilities of C and C++.