Beginning C:From Novice to Professional(4th)


英文版+源码,至于内容就不用多介绍了!
资源截图
代码片段和文件信息
/* Program 10.1        Exercising formatted input */
#include 
#include            /* For wscanf() version */

const size_t SIZE = 20;      /* Max characters in a word */

int main(void)
{
  int value_count = 0;       /* Count of input values read */
  float fp1 = 0.0;           /* Floating-point value read  */
  int i = 0;                 /* First integer read         */
  int j = 0;                 /* Second integer read        */
  char word1[SIZE] = “ “;    /* First string read          */
  char word2[SIZE] = “ “;    /* Second string read         */
  int byte_count = 0;        /* Count of input bytes read  */

  value_count = scanf(“%f %d %d %[abcdefghijklmnopqrstuvwxyz] %*1d %s%n“
     &fp1 &i  &j word1 word2 &byte_count);

/* Alternative 1
  value_count = scanf(“%4f %d %d %*d %[abcdefghijklmnopqrstuvwxyz] %*1d %[^o]%n“
                                           &fp1 &i  &j word1 word2 &byte_count);
*/


/* Alternative 2
  value_count = scanf(“%4f %4d %d %*d %[abcdefghijklmnopqrstuvwxyz] %*1d %[^o]%n“
                                           &fp1 &i  &j word1 word2 &byte_count);
*/

/* You could also use wscanf() to read the data reading the two strings
   as wide-character strings.

  wchar_t wword1[SIZE] = “ “;
  wchar_t wword2[SIZE] = “ “;
  value_count = wscanf(L“%f %d %d %l[abcdefghijklmnopqrstuvwxyz] %*1d %ls%n“
                               &fp1 &i  &j wword1 wword2 &byte_count);

*/

  printf(“
Count of bytes read = %d
“ byte_count);
  printf(“
Count of values read = %d
“ value_count);
  printf(“
fp1 = %f   i = %d   j = %d“ fp1 i j);
  printf(“
word1 = %s   word2 = %s
“ word1 word2);

/* Replacement for line above for wide-character strings version

  printf(“
wword1 = %ls   wword2 = %ls
“ wword1 wword2);

*/

  return 0;
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件   13911066  2007-03-07 22:48  Apress.Beginning.C.From.Novice.to.Professional.4th.Edition.Oct.2006.pdf

     文件       1888  2006-07-24 15:28  7534 Code DownloadCode from the Bookprogram10_01.c

     文件        414  2006-07-24 15:29  7534 Code DownloadCode from the Bookprogram10_02.c

     文件        496  2006-07-24 15:49  7534 Code DownloadCode from the Bookprogram10_03.c

     文件        449  2006-07-24 15:58  7534 Code DownloadCode from the Bookprogram10_04.c

     文件        666  2006-07-24 16:02  7534 Code DownloadCode from the Bookprogram10_05.c

     文件        811  2006-07-24 18:50  7534 Code DownloadCode from the Bookprogram10_06.c

     文件       2364  2006-09-16 17:37  7534 Code DownloadCode from the Bookprogram10_07.c

     文件        640  2006-07-25 12:25  7534 Code DownloadCode from the Bookprogram10_08.c

     文件        461  2006-07-25 12:26  7534 Code DownloadCode from the Bookprogram10_09.c

     文件        395  2006-07-25 12:29  7534 Code DownloadCode from the Bookprogram10_10.c

     文件       1017  2006-09-16 17:40  7534 Code DownloadCode from the Bookprogram10_11.c

     文件        367  2006-07-25 12:52  7534 Code DownloadCode from the Bookprogram10_12.c

     文件       1376  2006-04-13 13:48  7534 Code DownloadCode from the Bookprogram11_01.c

     文件       1845  2006-04-14 13:09  7534 Code DownloadCode from the Bookprogram11_02.c

     文件       1972  2006-04-13 14:02  7534 Code DownloadCode from the Bookprogram11_03.c

     文件       2737  2006-04-13 14:07  7534 Code DownloadCode from the Bookprogram11_04.c

     文件       2815  2006-04-13 14:11  7534 Code DownloadCode from the Bookprogram11_05.c

     文件       3089  2006-09-17 16:45  7534 Code DownloadCode from the Bookprogram11_06.c

     文件       5735  2006-04-13 15:04  7534 Code DownloadCode from the Bookprogram11_06a.c

     文件       4156  2006-09-17 16:48  7534 Code DownloadCode from the Bookprogram11_07.c

     文件        593  2006-09-17 16:52  7534 Code DownloadCode from the Bookprogram11_08.c

     文件       6587  2006-09-17 18:25  7534 Code DownloadCode from the Bookprogram11_09.c

     文件       1662  2006-08-04 15:42  7534 Code DownloadCode from the Bookprogram12_01.c

     文件       2324  2006-08-14 17:36  7534 Code DownloadCode from the Bookprogram12_02.c

     文件       1945  2006-09-04 18:41  7534 Code DownloadCode from the Bookprogram12_03.c

     文件       7612  2006-08-05 16:39  7534 Code DownloadCode from the Bookprogram12_04.c

     文件       5470  2006-09-17 19:51  7534 Code DownloadCode from the Bookprogram12_05.c

     文件       2694  2006-08-05 20:02  7534 Code DownloadCode from the Bookprogram12_06.c

     文件      11787  2006-09-04 18:46  7534 Code DownloadCode from the Bookprogram12_07.c

............此处省略171个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)