/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/*This is an example of how to use the function fgetwc(FILE *).  It will 
  retrieve a wide character from an input stream.
*/
#include <wchar.h>

int main() { 
    FILE *stream;

    printf("Displays the first character from the file, ""wctype.c""\n"); 
    if((stream = fopen("fgetwc.c", "r")) != NULL) {
        printf("fgetwc(stream) = ");
        fputwc( fgetwc(stream), stdout);
        printf("\n");
    }
    else
        printf("Error in opening file!\n");
    fclose(stream);
}

