Solved

Part 2

Posted on 1998-11-01
3
220 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
thresher_shark earned 200 total points
ID: 1253996
Answer coming....
0
 
LVL 6

Expert Comment

by:thresher_shark
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!
0
 

Author Comment

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

690 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