Improve company productivity with a Business Account.Sign Up

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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

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