Scanf
  Home FAQ Contact Sign in
comp.lang.c.moderated only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.c.moderated Profile…
 Up
Scanf         


Author: C lang
Date: May 5, 2008 14:01

Can scanf be use as a function?if so plz describe.
--
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
4 Comments
Re: Scanf         


Author: Barry Schwarz
Date: May 6, 2008 23:38

On Mon, 5 May 2008 16:01:53 -0500 (CDT), C lang
gmail.com> wrote:
>Can scanf be use as a function?if so plz describe.

scanf is a function. Therefore it must be used as a function. The
return value is the number of conversions successfully performed. For
example,
int y;
int x = scanf("%%d", &y);

As with most functions, your are also allowed to ignore (or discard)
the return value, as in
scanf("%%d",&y);

Remove del for email
--
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
no comments
Re: Scanf         


Author: Gordon Burditt
Date: May 6, 2008 23:38

>Can scanf be use as a function?if so plz describe.

scanf() *is* a function supplied by a C hosted implementation (and
perhaps non-hosted ones as well). What do you want to do with it?

PL/Z is not C. I thought the Z80 processor was pretty obsolete by now.
--
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
no comments
Re: Scanf         


Author: Iman S. H. Suyoto
Date: May 6, 2008 23:38

C lang wrote:
> Can scanf be use as a function?if so plz describe.

scanf() _is_ a function. Perhaps be more elaborate with your question?
--
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
no comments
Re: Scanf         


Author: Jack Klein
Date: May 6, 2008 23:39

On Mon, 5 May 2008 16:01:53 -0500 (CDT), C lang
gmail.com> wrote in comp.lang.c.moderated:
> Can scanf be use as a function?if so plz describe.

I think you need to try and ask this question again, because what you
are asking is not clear.

scanf() is a function, and you can use it the same two ways that you
can use any other function in C, you can call it or take its address.

So you need to use more words to explain what you want to know.
Show full article (0.91Kb)
no comments