/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* This is an example for getwchar(void).  This function will retrieve a wide
   character from the input stream, such as from stdin.  This program is
   executed by: getwchar.c < getwchar.in
   The input file getwchar.in contains: 'i'
*/
#include <wchar.h>

int main() { 
    int i, ch;
    char buffer[80];

    printf("Enter a character. \n"); 
    for(i =0; (i<80) && (ch !='\n'); i++) {
    	ch = getwchar();
        buffer[i]= (char)ch;

    }
    printf("You entered: %s\n",buffer);
}

