Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,679 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,196 people online right now. Registration is fast and FREE... Join Now!




printf?

 
Reply to this topicStart new topic

printf?

jencalma
post 14 Jul, 2007 - 10:33 PM
Post #1


New D.I.C Head

*
Joined: 13 Jul, 2007
Posts: 47


My Contributions


what does printf means in turbo c and scanf what does it means to??? tnx...
User is offlineProfile CardPM

Go to the top of the page

PennyBoki
post 15 Jul, 2007 - 05:31 AM
Post #2


system("revolution");

Group Icon
Joined: 11 Dec, 2006
Posts: 2,009



Thanked 5 times

Dream Kudos: 500

Expert In: Java,C++,C

My Contributions


Hi printf is a function that prints something on the output screen.
scanf is also a function but a function that takes the user's input.
See this LINK and this LINK.
User is offlineProfile CardPM

Go to the top of the page

jencalma
post 15 Jul, 2007 - 05:46 AM
Post #3


New D.I.C Head

*
Joined: 13 Jul, 2007
Posts: 47


My Contributions


QUOTE(PennyBoki @ 15 Jul, 2007 - 06:31 AM) *

Hi printf is a function that prints something on the output screen.
scanf is also a function but a function that takes the user's input.
See this LINK and this LINK.


what about this \n? what is the function of this??
User is offlineProfile CardPM

Go to the top of the page

Amadeus
post 15 Jul, 2007 - 05:52 AM
Post #4


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 12,178



Thanked 33 times

Dream Kudos: 25
My Contributions


\n is the new line character used in C and many other languages. It ends the line with a carriage return.
User is offlineProfile CardPM

Go to the top of the page

jencalma
post 15 Jul, 2007 - 05:55 AM
Post #5


New D.I.C Head

*
Joined: 13 Jul, 2007
Posts: 47


My Contributions


QUOTE(Amadeus @ 15 Jul, 2007 - 06:52 AM) *

\n is the new line character used in C and many other languages. It ends the line with a carriage return.


can you explain further more!? please give me some examples tnx... biggrin.gif

This post has been edited by jencalma: 15 Jul, 2007 - 05:56 AM
User is offlineProfile CardPM

Go to the top of the page

Amadeus
post 15 Jul, 2007 - 06:01 AM
Post #6


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 12,178



Thanked 33 times

Dream Kudos: 25
My Contributions


No problem
CODE

print("Hello, how are you?");

produces the following
QUOTE

Hello, how are you?

while
CODE

print("Hello, \n how are you?");

produces
QUOTE

Hello,
how are you?

It forces the insertion of a new line, meaning that the text following the newline character will be displayed on another line.
User is offlineProfile CardPM

Go to the top of the page

jencalma
post 16 Jul, 2007 - 12:08 AM
Post #7


New D.I.C Head

*
Joined: 13 Jul, 2007
Posts: 47


My Contributions


QUOTE(Amadeus @ 15 Jul, 2007 - 07:01 AM) *

No problem
CODE

print("Hello, how are you?");

produces the following
QUOTE

Hello, how are you?

while
CODE

print("Hello, \n how are you?");

produces
QUOTE

Hello,
how are you?

It forces the insertion of a new line, meaning that the text following the newline character will be displayed on another line.


thank you very much!!!
User is offlineProfile CardPM

Go to the top of the page

jencalma
post 17 Jul, 2007 - 12:09 AM
Post #8


New D.I.C Head

*
Joined: 13 Jul, 2007
Posts: 47


My Contributions


QUOTE(jencalma @ 16 Jul, 2007 - 01:08 AM) *

QUOTE(Amadeus @ 15 Jul, 2007 - 07:01 AM) *

No problem
CODE

print("Hello, how are you?");

produces the following
QUOTE

Hello, how are you?

while
CODE

print("Hello, \n how are you?");

produces
QUOTE

Hello,
how are you?

It forces the insertion of a new line, meaning that the text following the newline character will be displayed on another line.


thank you very much!!!



how about \t what is the function of this and give some further explanation and examples... tnx... wink2.gif
User is offlineProfile CardPM

Go to the top of the page

Xing
post 17 Jul, 2007 - 01:13 AM
Post #9


D.I.C Addict

Group Icon
Joined: 22 Jul, 2006
Posts: 723



Thanked 2 times

Dream Kudos: 1575
My Contributions


Do you ever try using google?
User is offlineProfile CardPM

Go to the top of the page

Amadeus
post 17 Jul, 2007 - 04:09 AM
Post #10


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 12,178



Thanked 33 times

Dream Kudos: 25
My Contributions


\t is the tab delimiter - all other portions of the explanation hold the same.
User is offlineProfile CardPM

Go to the top of the page

jencalma
post 17 Jul, 2007 - 04:33 AM
Post #11


New D.I.C Head

*
Joined: 13 Jul, 2007
Posts: 47


My Contributions


QUOTE(Amadeus @ 17 Jul, 2007 - 05:09 AM) *

\t is the tab delimiter - all other portions of the explanation hold the same.


can you give me some examples showing the \t pleaseee tnx.. biggrin.gif
User is offlineProfile CardPM

Go to the top of the page

Amadeus
post 17 Jul, 2007 - 04:41 AM
Post #12


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 12,178



Thanked 33 times

Dream Kudos: 25
My Contributions


Actually, it now appears I'm simply completing your homework. I won;t do that, but will help you find the answers.

Do you know what a tab is? the tab key on your keyboard? Do you know what that key does when you press it?

http://www.gillius.org/ctut/app_a.htm
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/23/08 06:38AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month