Passing strings directly into functions

Viewed 78

Is it bad practice to directly pass strings into functions?

Will it cause memory errors?

func(char *x) {
   //do stuff
}

func("String");

Or is it safer to do this?

char *s = "string";
func(s);
2 Answers
Related