1.

Which function converts the wide-character string to a multibyte string?(a) wcstombs()(b) mbstowcs()(c) mbtowc()(d) mblen()This question was posed to me during an interview.This intriguing question originated from General Utilities topic in portion C Library of C

Answer»

Correct option is (a) wcstombs()

The best I can EXPLAIN: The C LIBRARY function size_t wcstombs(char *ptr, const wchar_t *ws, size_t N)is used to convert the wide-character string was to a multibyte string starting at ptr. At most n bytes are WRITTEN to ptr.



Discussion

No Comment Found

Related InterviewSolutions