Part 2

Posted on 1998-11-01
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?
Question by:p314159265
  • 2

Accepted Solution

thresher_shark earned 200 total points
ID: 1253996
Answer coming....

Expert Comment

ID: 1253997
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!

Author Comment

ID: 1253998
Thanks.  I am new to programming, I need all the help I can get.

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Dll Dynamic way c/c++ 9 145
memory leak detection 9 83
How do I install gcc 4.8.4 on a Linux Ubuntu 14.04 machine? 5 1,758
Why  my code (program) build with old compiler? 11 47
This tutorial is posted by Aaron Wojnowski, administrator at  To view more iPhone tutorials, visit This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
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.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

803 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