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.
(A) is true, but (R) is false.
The assertion is plainly true; the reason names the wrong specifier — %lu is for long unsigned, while short unsigned takes %hu. The answer is option 3.
How the specifiers are built. A length modifier is inserted before the conversion character:
| Modifier | Meaning | Unsigned decimal |
|---|---|---|
| h | short | %hu |
| l | long | %lu |
| (none) | int | %u |
| ll | long long | %llu |
The letters are mnemonic: h for half (short) and l for long. The reason has simply taken the wrong one.
Why the mistake is not harmless. printf is a variadic function, so the compiler cannot check the arguments against the format string in general — it must trust the specifier. Writing %lu for a short makes printf read more bytes off the argument stack than were pushed, so it prints a corrupted value and misaligns every argument that follows. With scanf the consequence is worse: %lu writes a long's worth of bytes through a pointer to a short, overwriting adjacent memory. Modern compilers do warn about format mismatches, which is why that warning should never be ignored.
The assertion, for completeness. C's arithmetic types are char, short, int, long, long long, each with signed and unsigned forms, plus float, double and long double. The standard fixes only the minimum widths and the ordering
\(\text{sizeof(short)}\le\text{sizeof(int)}\le\text{sizeof(long)}\)
leaving the exact sizes to the implementation — which is why <stdint.h> was added, providing int16_t, uint32_t and the rest for code that needs an exact width.
A footnote on default promotion : in a variadic call a short argument is promoted to int anyway, so %hu and %u both happen to work with printf. The distinction is nonetheless real for scanf, and %lu is wrong in either case.
Hence, (A) is true, but (R) is false.
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 ?
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 :
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?