is it wrong way of coding ?

what is the issue of this code ?
could you can help me where was wrong.

#include<stdio.h>
char solve(const char* InputString)
{
int i=0;
while(*InputString)
{
printf("%c",InputString);
InputString++;
}

}
int main()
{
solve("test string");

}

Can you describe exactly what it does? What is the expected output?

passing a string print character by character

You want to print a character, but you are passing a character pointer. You want

printf("%c",*InputString);

Adding compiler warnings to your preference settings should also help identify problems (assuming you are using the Arduino IDE).
Using main() directly is not usual in Arduino programming.

The problem is it is not in code tags! Check the forum guidelines about how to post then you can update your post to include code tags and post a new reply with the standard required information.

what is the issue of this code ?
could you can help me where was wrong.

Is this an Arduino question ?
If so, which board are you using ?