Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > hw does printf(),scanf() nd all work??

Reply
Thread Tools

hw does printf(),scanf() nd all work??

 
 
jt
Guest
Posts: n/a
 
      03-03-2008
everytime we pass different number of variables.
even though there is no polymorphism concept in C.
hw do they accomplish.
 
Reply With Quote
 
 
 
 
santosh
Guest
Posts: n/a
 
      03-03-2008
jt wrote:

> everytime we pass different number of variables.
> even though there is no polymorphism concept in C.
> hw do they accomplish.


The format string specifies everything that they need to know (and
expect) of the following arguments. In C, functions with variadic
arguments can accept differing number and type of arguments though they
must accept at least one fixed parameter. This is a somewhat advanced
topic in C. You don't need to worry about their actual mechanics until
much later.

 
Reply With Quote
 
 
 
 
Kenneth Brody
Guest
Posts: n/a
 
      03-03-2008
jt wrote:
>
> everytime we pass different number of variables.
> even though there is no polymorphism concept in C.
> hw do they accomplish.


"Variadic functions", aka "varargs". The functions are defined as
taking an unspecified list of parameters of unspecified types.

For example:

int printf(const char * restrict format, ...);

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <(E-Mail Removed)>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
![Oof Topix] All McCain, All Flip-Flop, All the Time Bucky Breeder Computer Support 7 09-27-2008 03:33 PM
XP 'All Programs' does not show all programs & I can be adjust it CocoLuke Computer Support 3 05-04-2008 08:20 AM
All new updates at Testking.co.uk with all new added exams with 100 % passing guarantee Moderator Microsoft Certification 5 02-02-2006 02:48 PM
All new updates at Testking.co.uk with all new added exams with 100 % passing guarantee Moderator MCSE 5 02-02-2006 02:48 PM
All new updates at Testking.co.uk with all new added exams with 100 % passing guarantee Moderator Microsoft Certification 0 01-23-2006 01:15 PM



Advertisments