The function "isalnum( )" returns a non-zero value if the character is alphanumeric and zero otherwise. What is header file to be used in the main program ?
ctype.h
isalnum() belongs to the character-classification family, and every member of that family is declared in ctype.h — option 3.
The name itself is the clue: the whole is… group tests what type of character it has been given, and ctype stands for character type.
| Header | Contains | Typical members |
|---|---|---|
| stdio.h | Input and output | printf, scanf, fopen, fgets |
| io.h | Low-level file handles (non-standard, DOS/Windows) | open, read, write, close |
| ctype.h | Character classification and conversion | isalnum, isalpha, isdigit, toupper |
| string.h | Operations on whole strings | strlen, strcpy, strcmp, strcat |
The natural confusion is with string.h, since both deal with text. The dividing line is the unit of work: ctype.h functions each take a single character and answer a question about it, while string.h functions operate on null-terminated arrays of characters. isalpha(s[i]) needs ctype.h; strlen(s) needs string.h.
The full classification set is worth knowing as a group, since exam questions rotate through it: isalpha (letter), isdigit (0–9), isalnum (either), isspace, ispunct, isupper, islower, isxdigit. The same header also declares the two conversions toupper and tolower.
A subtlety in the prototype :
int isalnum(int c);
The parameter is int, not char, so that the value EOF can be passed — it lies outside the range of char. That is why the return is also int: the standard guarantees only "non-zero" for true, not the value 1, so results must be tested as if (isalnum(c)) and never compared with == 1.
What happens if the header is omitted : older C compilers assume an undeclared function returns int and compile it anyway, so the mistake often escapes notice until the behaviour differs on another platform. C99 made the implicit declaration an error.
Hence, the header file required is ctype.h.
To read a integer variable, find the correct format given below :
Int m;
Find the correct list, which is the reverse (at all levels) of the given list :
[[4, 7, 8], 2, 9, [19, 6], 20, 3]
(i) 3, 20
(ii) 9, 2
(iii) [6, 19]
(iv) [8, 7, 4]
Which of the following is not an infinite loop ?
(A) int i = 1;
while (1)
{
i++ ;
}
(B) for ( ; ; ) ;
(C) int t = 0, f ;
while (t)
{
f = 1;
}
(D) int y, x = 0 ;
do
{
y = x;
}
while (x == 0);
The three types of loops available in C language are
i. for
ii. while
iii. do-while
Which loops do not operate without testing the condition even once ?
Match the following :
| List – I | List – II |
| a. associativity | i. memory storage |
| b. # define | ii. if-then-else |
| c. auto | iii. operators with equal precedence |
| d. conditional operator | iv. define operator |
Codes :
Assertion (A) : 'C' uses many data types such as integers (short and long) and float etc.
Reason (R) : Conversion specifier used for short unsigned integer is % lu.
Which bitwise operator is suitable for turning off a particular bit in a number ?
Which storage class is used for the variables that are often required in a program ?
Which is not a proper way of array declaration ?
Exponentiation operation in C is carried out as
Read the given figure and find the region representing persons who are educated and employed but not confirmed in job.

The magazine in which Mahatma Gandhi mentioned what he wanted the Constitution to do is:
Which gas shields the surface of the earth from ultraviolet radiation from the sun?
Which event is marked as an Intangible Cultural Heritage of Humanity by UNESCO?
Who has been conferred with the rank of the Commander of the Order of the British Empire in 2018?