How to capture C program return values in Kshell

I have a K shell script (ksh) that needs to return an email address. A C program was written (prog1) to now access the email address off of an oracle table. The call to the program in the ksh is

prog1 -p parm1

Based on Parm1 the program will read an oracle table and retrieve the email address. Now I have this email address in a string variable in my program.

How do I get it back to the ksh???

1) I have seen examples where I could do returnvalue = `prog1 -p parm1` and my email address would be in returnvalue. This doesn't seem to be working because I get nothing back. In my C program I am doing a
return(returnString) at the end of my program to pass it back, and it does not seem to be working

2) I can write the email address out to a file, but I am not sure how to define a file ksh, and have the program access or write to it.

Any help and/or direction will be greatly appreciated.
Thanks.

If you are calling your C-program from the shell script, then perhaps all it (the C-program) has to do is print the email address (and hopefully nothing else):

...
  printf( "%s\n", string_with_email_address)
...

And then in your Shell script:

email_address=$(prog1 -p parm1)

and then the shell variable "email_address" contains just that.

Worked awesome. Thank you so much!!!