/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* This program uses fwprintf to format various
 * data and print it to the file named FWPRINTF.TXT. It
 * then displays FPRINTF.TXT on the screen using the system
 * function to invoke the operating-system more command.
 */

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <wchar.h>

FILE *stream;

int main()
{
   wchar_t *s1 = L"Hello world";

   stream = fopen("fwprintf.txt", "w");
   fwprintf(stream, L"%S\n", s1);
   fclose(stream);
   system("more fwprintf.txt");
/*
    system("rm fwprintf.txt");
*/
   return 0;
}
