[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

Part 2

How can I display the value
of a variable using the
printf statement?

Specifically I can't figure
out how to display a string
of characters like so:

char string[128] = "The string"
printf ("?");

What to do?
0
p314159265
Asked:
p314159265
  • 2
1 Solution
 
thresher_sharkCommented:
Answer coming....
0
 
thresher_sharkCommented:
To print a string using printf:

char string[128] = "The string";
printf ("%s", string);

If you have any additional questions, please feel free to ask.  Thanks!
0
 
p314159265Author Commented:
Thanks.  I am new to programming, I need all the help I can get.
0

Featured Post

Live webcast with Pinal Dave

Pinal Dave will teach you tricks to help identify the real root cause of database problems rather than red herrings. Attendees will learn scripts that they can use in their environment to immediately figure out their performance Blame Shifters and fix them quickly.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now