Advertisement
andruhovski

prog0104-demo

Sep 4th, 2014
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include "stdafx.h"
  2. int _tmain(int argc, _TCHAR* argv[])
  3. {
  4.     setlocale(LC_ALL, "Ukrainian");
  5.     int i, result;
  6.     float fp;
  7.     char c, s[80];
  8.     wchar_t  wc, ws[80];
  9.         result = scanf_s("%d %f %c %C %s %S", &i, &fp, &c, 1,
  10.         &wc, 1, s, _countof(s), ws, _countof(ws));
  11.     printf("The number of fields input is %d\n", result);
  12.     printf("The contents are: %d %f %c %C %s %S\n", i, fp, c, wc, s, ws);
  13.  
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement