Solved

Part 2

Posted on 1998-11-01
3
179 Views
Last Modified: 2010-04-15
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
Comment
Question by:p314159265
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
thresher_shark earned 200 total points
Comment Utility
Answer coming....
0
 
LVL 6

Expert Comment

by:thresher_shark
Comment Utility
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
 

Author Comment

by:p314159265
Comment Utility
Thanks.  I am new to programming, I need all the help I can get.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now