Match the LIST-I with LIST-II
| LIST-I | LIST-II |
|---|---|
| A. long signed int | I. %lf |
| B. double | II. %Lf |
| C. long double | III. %c |
| D. unsigned character | IV. %ld |
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. A-IV, B-I, C-II, D-III
Explanation
In C, a 'long signed int' is printed/scanned with the %ld format specifier, matching IV. A 'double' uses %lf, matching I. A 'long double' requires the capitalised %Lf specifier, matching II. An 'unsigned character' (a char value) is printed with %c, matching III. So the correct match is A-IV, B-I, C-II, D-III.More Programming Languages and Computer Graphics questions
- Which of the following are correct about constructors in C++? A. They have the same name as the class. B. They can return values. C. They a…
- Arrange the following data types in non-decreasing order according to the length of their representation in C++. A. char B. int C. float D.…
- Which of the following would be the value of z for the C program code? x = 16; y = 4; z = x >> y;
- What will be the output of the following program? #include<stdio.h> int main() { int i; for (i = 0; i++<10; ) printf("%d", i++); return 0; }
- Match the LIST-I with LIST-II. LIST-I LIST-II A. Pivot point I. Reflection B. Fixed point II. Shear C. Mirror image III. Rotation D. Distor…
- The number of pixel columns divided by the number of scan lines that can be displayed by the system, is called