Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 24-09-2005, 02:28 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Sep 2005
Posts: 23
Default scanf() function


like every function what value is returned by scanf() and printf() in C.
ra_rav is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 24-09-2005, 02:33 PM   #2 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default

0 i guess, coz no value held by it.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 24-09-2005, 03:01 PM   #3 (permalink)
Human Spambot
 
tuxfan's Avatar
 
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
Default

They don't return values, they perform something. In other programming languages, there are 2 types of sub-routines - procedures and functions. In C there are only functions. So some of the functions behave like procedures and don't return anything.
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
tuxfan is offline  
Old 24-09-2005, 03:34 PM   #4 (permalink)
Wise Old Owl
 
vignesh's Avatar
 
Join Date: Jul 2004
Location: Chennai
Posts: 1,659
Default

They dont return values.they are predefined functions belonging to the stdio.h header file.They take input or printf somethng on the screen
vignesh is offline  
Old 24-09-2005, 07:05 PM   #5 (permalink)
Alpha Geek
 
NikhilVerma's Avatar
 
Join Date: May 2004
Location: India
Posts: 930
Default

What are you guys doing !
printf DOES return a value !!!!!


Check this declaration.... If you want take a look in the C++ help...

Code:
 int printf  (              const char *format [, argument, ...]);
It returns the length of displayed character's ... including ....
NikhilVerma is offline  
Old 24-09-2005, 08:38 PM   #6 (permalink)
asia://india/ka/bangalore
 
a_to_z123's Avatar
 
Join Date: Nov 2004
Location: Bangalore, India
Posts: 293
Default

Quote:
Originally Posted by NikhilVerma
What are you guys doing !
printf DOES return a value !!!!!
Yeah I whole-heartedly agree with Nikhil. Good, you showed the others the right path!
Hunh! And there are Brainiacs in here!!!
__________________
:) I've got my F, C and K . Now all I need is You !!! :)
a_to_z123 is offline  
Old 24-09-2005, 08:47 PM   #7 (permalink)
In The Zone
 
Join Date: Aug 2004
Posts: 387
Default

printf() will return the length of the string printed...
__________________
www.digizeal.org
Tech support + JAVA and Cisco dedicated subforums..
Come and check
anubhav_har is offline  
Old 26-09-2005, 12:50 PM   #8 (permalink)
Human Spambot
 
tuxfan's Avatar
 
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
Default

That shows how horribly out of touch I am with C So sorry for incorrect answer.
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
tuxfan is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by topgear
- by Charan

Advertisement




All times are GMT +5.5. The time now is 06:42 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2