⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node49.htm

📁 Tutorila for CPP, very good tutorial for CPP
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//FR">
<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
 by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippman, Marek Rouchal, Martin Wilck and others -->
<HTML><BLOCKQUOTE><img src="logo.gif" tppabs="http://www.linux-kheops.com/doc/ansi-c/icons.gif/logo.gif" ALIGN=right></A> 
<HEAD>
<TITLE>Lecture formatt閑</TITLE>
<META NAME="description" CONTENT="Lecture formatt閑">
<META NAME="keywords" CONTENT="Introduction_ANSI_C">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
<LINK REL="STYLESHEET" HREF="Introduction_ANSI_C.css" tppabs="http://www.linux-kheops.com/doc/ansi-c/Introduction_ANSI_C.css">
<LINK REL="next" HREF="node50.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node50.htm">
<LINK REL="previous" HREF="node48.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node48.htm">
<LINK REL="up" HREF="node35.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node35.htm">
<LINK REL="next" HREF="node50.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node50.htm">
</HEAD>
<BODY BACKGROUND="marge.gif" tppabs="http://www.linux-kheops.com/doc/ansi-c/icons.gif/marge.gif" TEXT=#000000 LINK=#FF0000 VLINK=#1809BB >
<!--Navigation Panel-->
<A NAME="tex2html1763"
 HREF="node50.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node50.htm">
<IMG WIDTH="77" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="next_motif.gif" tppabs="http://www.linux-kheops.com/doc/ansi-c/icons.gif/next_motif.gif"></A> 
<A NAME="tex2html1759"
 HREF="node35.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node35.htm">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="up_motif.gif" tppabs="http://www.linux-kheops.com/doc/ansi-c/icons.gif/up_motif.gif"></A> 
<A NAME="tex2html1753"
 HREF="node48.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node48.htm">
<IMG WIDTH="96" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="previous_motif.gif" tppabs="http://www.linux-kheops.com/doc/ansi-c/icons.gif/previous_motif.gif"></A> 
<A NAME="tex2html1761"
 HREF="node1.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node1.htm">
<IMG WIDTH="96" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="contents_motif.gif" tppabs="http://www.linux-kheops.com/doc/ansi-c/icons.gif/contents_motif.gif"></A> 
<A NAME="tex2html1762"
 HREF="node174.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node174.htm">
<IMG WIDTH="59" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
 SRC="index_motif.gif" tppabs="http://www.linux-kheops.com/doc/ansi-c/icons.gif/index_motif.gif"></A> 
<BR>
<B> Suivant:</B> <A NAME="tex2html1764"
 HREF="node50.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node50.htm">Les derni鑢es instructions</A>
<B> D閎ut:</B> <A NAME="tex2html1760"
 HREF="node35.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node35.htm">Les pointeurs</A>
<B> Pr閏閐ent:</B> <A NAME="tex2html1754"
 HREF="node48.htm" tppabs="http://www.linux-kheops.com/doc/ansi-c/node48.htm">Exercice</A><HR>
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><strong>Paragraphes</strong></A>
<UL>
<LI><A NAME="tex2html1765"
 HREF="node49.htm#SECTION005140100000000000000" tppabs="http://www.linux-kheops.com/doc/ansi-c/node49.htm#SECTION005140100000000000000">
Valeur rendue</A>
<LI><A NAME="tex2html1766"
 HREF="node49.htm#SECTION005140200000000000000" tppabs="http://www.linux-kheops.com/doc/ansi-c/node49.htm#SECTION005140200000000000000">
Attention</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<H1><font COLOR=#1809BB><A NAME="SECTION005140000000000000000">
Lecture formatt閑</A>
</font></H1>
<A NAME="2207">&#160;</A>
<A NAME="2400">&#160;</A>
<A NAME="2401">&#160;</A>
<P>
Il existe dans la biblioth鑡ue standard une fonction de lecture formatt閑 qui
fonctionne selon le m阭e principe que la proc閐ure <TT>printf</TT>.
Sa syntaxe d'utilisation est la suivante&nbsp;:
<BR>
<TT>scanf</TT>  <TT>(</TT>  <I>format</I>  <TT>,</TT> 
    <I>liste-d'expressions</I>  <TT>)</TT>  <TT>;</TT>
<BR>
<I>format</I> est une cha頽e de caract鑢es indiquant sous forme de s閝uences
d'閏happement les entit閟 que <TT>scanf</TT> lit sur l'<I>entr閑 standard</I>&nbsp;:
<DL COMPACT>
<DT><SMALL>-</SMALL>
<DD><code>%d</code> pour un nombre d閏imal&nbsp;;
<DT><SMALL>-</SMALL>
<DD><code>%x</code> pour un nombre 閏rit en hexad閏imal&nbsp;;
<DT><SMALL>-</SMALL>
<DD><code>%c</code> pour un caract鑢e.
</DL>
Tous les 閘閙ents de la <I>liste-d'expressions</I> doivent d閘ivrer apr鑣 
関aluation l'adresse de la variable dans laquelle on veut mettre la valeur lue.
Si le flot de caract鑢es lu sur l'<I>entr閑 standard</I> ne correspond pas 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -