Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format String in C

Status
Not open for further replies.

sujincls

Programmer
Jun 14, 2002
6
IN
Could you please tell me how to format a string in C

For example,

input : "Hello"
output: "**********Hello**********"

Thanks,
Sujin
 
Wouldn't this be better posted on the C forum?
 
I'm not a C programmer, but I would use printf ...

printf("********%s********",argv[1])

... or whatever the syntax is for the input. Read the man page on printf for more info.

Greg.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top