/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* This program uses wprintf function to produce formatted output.
 */
#include <stdio.h>
#include <wchar.h>

int main()
{
   char   ch = 'h', *string = "computer";
   int    count = -9234;
   double fp = 251.7366;
   wchar_t wch = L'w', *wstring = L"Unicode";


   /* Display characters. */
   printf("Characters in field (1):\n%10c%5hc%5C%5lc\n", ch, ch, wch, wch);
   wprintf(L"Characters in field (2):\n%10C%5hc%5c%5lc\n", ch, ch, wch, wch);

   /* Display strings. */
   printf("Strings in field (1):\n%25s\n%25.4hs\n\t%S%25.3ls\n",
   string, string, wstring, wstring);
   wprintf(L"Strings in field (2):\n%25S\n%25.4hs\n\t%s%25.3ls\n",
       string, string, wstring, wstring);

   return 0;
}
