MCQOPTIONS
Saved Bookmarks
This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Arrays knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What will you do to treat the constant 3.14 as a long double ? |
| A. | use 3.14LD |
| B. | use 3.14L |
| C. | use 3.14DL |
| D. | use 3.14LF |
| Answer» C. use 3.14DL | |
| 2. |
What will you do to treat the constant 3.14 as a float ? |
| A. | use float(3.14f) |
| B. | use 3.14f |
| C. | use f(3.14) |
| D. | use (f)(3.14) |
| Answer» C. use f(3.14) | |
| 3. |
We want to round off x , a float , to an int value, The correct way to do is |
| A. | y = (int)(x + 0.5) |
| B. | y = int(x + 0.5) |
| C. | y = (int)x + 0.5 |
| D. | y = (int)((int)x + 0.5) |
| Answer» B. y = int(x + 0.5) | |
| 4. |
Which statement will you add in the following program to work it correctly? |
| A. | #include<conio.h> |
| B. | #include<math.h> |
| C. | #include<stdlib.h> |
| D. | #include<dos.h> |
| Answer» C. #include<stdlib.h> | |
| 5. |
If the binary eauivalent of 5.375 in normalised form is 0100 0000 1010 1100 0000 0000 0000 0000, what will be the output of the program (on intel machine)? |
| A. | 40 AC 00 00 |
| B. | 04 CA 00 00 |
| C. | 00 00 AC 40 |
| D. | 00 00 CA 04 |
| Answer» D. 00 00 CA 04 | |