is anything wrong with this approach?
it seems to work but I keep looking around and waiting for something to hit me in the head :DCode:#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void str_output(char *x)
{
scanf("%s", x);
/*
do something with the string...
*/
}
int main(int argc, char *argv[])
{
char s[20];
printf("Input string: ");
str_output(s);
/*
do something with the string...
*/
return 0;
}