Read wide character string from keyboard and output : fgetws Wide String Read « Wide Character String « C Tutorial






#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):
1234

First string entered:
1234








16.4.fgetws Wide String Read
16.4.1.Read wide character string from keyboard and output