Explore topic-wise MCQs in C.

This section includes 11 Mcqs, each offering curated multiple-choice questions to sharpen your C knowledge and support exam preparation. Choose a topic below to get started.

1.

What is returned by the function localeconv()?

A. current location value
B. past location value
C. pointer to the last location
D. pointer to the current location
Answer» E.
2.

Select the macro that affects the information provided by localeconv function.

A. LC_ALL
B. LC_COLLATE
C. LC_NUMERIC
D. LC_CTYPE
Answer» D. LC_CTYPE
3.

WHAT_IS_RETURNED_BY_THE_FUNCTION_LOCALECONV()??$

A. current location value
B. past location value
C. pointer to the last location
D. pointer to the current location
Answer» E.
4.

Select the macro that affects the information provided by localeconv function?

A. LC_ALL
B. LC_COLLATE
C. LC_NUMERIC
D. LC_CTYPE
Answer» D. LC_CTYPE
5.

Which macro affects the strftime() function?

A. LC_TIME
B. LC_SEC
C. LC_MIN
D. LC_SET
Answer» B. LC_SEC
6.

LC_COLLATE affects strcoll() and strxfrm() functions.

A. true
B. false
Answer» B. false
7.

Which macro is used in the setlocale() function?

A. LC_SET
B. FLT_RADIX 2
C. LC_MESSAGES
D. SHRT_MAX
Answer» D. SHRT_MAX
8.

Select the function that reads or sets location dependent information.

A. longjmp()
B. setlocale()
C. assert()
D. toupper()
Answer» C. assert()
9.

Which macro sets everything defined under locale. h?

A. LC_ALL
B. LC_COLLATE
C. LC_SET
D. LC_TIME
Answer» B. LC_COLLATE
10.

Which among the given macros is defined in the header file locale.h?

A. SCHAR_MAX
B. FLT_RADIX 2
C. EDOM
D. LC_CTYPE
Answer» E.
11.

Which header file is used to define data formats and currency symbols?

A. setjmp.h
B. locale.h
C. stdarg.h
D. assert.h
Answer» C. stdarg.h