pretty new at this, ignore the rest but I am having issues passing a string value into a function in order to get it to display the info. below is the entire program, as is it compiles and runs, but crashes everytime.
MJ, place this print statement into your print subrtn. printf(" \n\n I am in the print fnc, and TEXT is : %s ", text );
and you'll see that the first string "FIRST is corrupted.
maybe not getting init'l ized or loosing it's pointer.
also, string display(string);
The fnc DISPLAY takes the string "string" as it's arg, which is fine.
however it doesn't RTN anything !!
If a fnc doesn't return anything or rtn's void then it's usually
better to declare it as such. void display(string);
Having just finished typing that, I noticed that you return a "0" ( or zero) within display(),
so you can remove the "0" (or zero) , and just say RETURN
having declared it as a VOID - - - void display(string)
or declare it as INT- - - int display(string)
The point being, that the two ( declaration and fnc) should match "TYPE"
Remember, you can always use fprint statements or other such statements to show where you are in the code, and, more importantly, what values are being returned ( or not) and what their values are ( or are not).