MCQOPTIONS
Saved Bookmarks
This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Objects of which class does the integer from the range -2^60 to 2^(60-1) belong to? |
| A. | Octal |
| B. | Bignum |
| C. | Fixnum |
| D. | Binary |
| E. | |
| Answer» C. Fixnum | |
| 2. |
single-quoted strings don`t allow ? |
| A. | substitution |
| B. | backslash notation |
| C. | single-quoted strings allow substitution and backslash notation. |
| D. | single-quoted strings don`t allow substitution and allow backslash notation. |
| Answer» E. | |
| 3. |
Which notation is used for Octal notation? |
| A. | \s |
| B. | \xnn |
| C. | \n |
| D. | \nn |
| Answer» E. | |
| 4. |
Which of the following Ruby Pseudo Variables is used to return current line number in the source file? |
| A. | _FILE_ |
| B. | _CURRENT_ |
| C. | _LINE_ |
| D. | None of the above |
| Answer» D. None of the above | |
| 5. |
Which of the following Ruby Pseudo-Variables is used for The receiver object of the current method? |
| A. | self |
| B. | current |
| C. | nil |
| D. | _FILE_ |
| Answer» B. current | |
| 6. |
Local variables in ruby begin with? |
| A. | @ |
| B. | _ |
| C. | * |
| D. | # |
| Answer» C. * | |
| 7. |
Default value of global variable is? |
| A. | -1 |
| B. | nil |
| C. | 1 |
| D. | infinite |
| Answer» C. 1 | |
| 8. |
Global variables in ruby begin with? |
| A. | @ |
| B. | # |
| C. | $ |
| D. | & |
| Answer» D. & | |