#include <stdio.h>
#include <wchar.h>
int main(void)
{
wchar_t text[100];
printf("\nEnter the string to be searched(less than 100 characters):\n");
fgetws(text, 100, stdin);
printf("\nFirst string entered:\n%S\n", text);
}
Enter the string to be searched(less than 100 characters):
asdf
First string entered:
asdf
16.3.Wide Character String Output |
| 16.3.1. | Output wide character string with %S in printf |