

MCQOPTIONS
Saved Bookmarks
This section includes 174 Mcqs, each offering curated multiple-choice questions to sharpen your C Programming knowledge and support exam preparation. Choose a topic below to get started.
51. |
‘fetchrow_hashref()’ returns a reference to the hash of row values keyed by what? |
A. | row name |
B. | column name |
C. | table name |
D. | database name |
Answer» C. table name | |
52. |
Which is the library file that contains various portability macros and definitions? |
A. | my_global.h |
B. | my_sys.h |
C. | mysql.h |
D. | my_local.h |
Answer» C. mysql.h | |
53. |
INT3 maps to MySQL type _____________ |
A. | TINYINT |
B. | SMALLINT |
C. | MEDIUMINT |
D. | BIGINT |
Answer» D. BIGINT | |
54. |
The maximum non zero value for FLOAT is ______________ |
A. | 3.402823466E+38 |
B. | 3.402823466E+37 |
C. | 3.402823466E+39 |
D. | 3.402823466E+35 |
Answer» B. 3.402823466E+37 | |
55. |
Which function returns an array of row values? |
A. | fetchrow_array() |
B. | fetchrow_arrayref() |
C. | fetch() |
D. | fetchrow_hashref() |
Answer» B. fetchrow_arrayref() | |
56. |
The join in which all the rows from the right table appear in the output irrespective of the content of the other table is ______________ |
A. | CARTESIAN JOIN |
B. | CROSS JOIN |
C. | INNER JOIN |
D. | RIGHT JOIN |
Answer» E. | |
57. |
The one that is not optional is _____________ |
A. | select_list |
B. | table_list |
C. | row_constraint |
D. | grouping_columns |
Answer» B. table_list | |
58. |
‘abc’ || ‘xyz’, when PIPES_AS_CONCAT is enabled, results in ____________ |
A. | 0 |
B. | 1 |
C. | abcxyz |
D. | xyzabc |
Answer» D. xyzabc | |
59. |
The number of rows in the table is 10. Suppose all rows are deleted. The new row starts with sequence number _____________ |
A. | 11 |
B. | 1 |
C. | 100 |
D. | 101 |
Answer» C. 100 | |
60. |
If the PIPES_AS_CONCAT is disabled, ‘abc’ || ‘xyz’ results in ____________ |
A. | 1 |
B. | 0 |
C. | error |
D. | -1 |
Answer» C. error | |
61. |
INT2 maps to MySQL type _____________ |
A. | TINYINT |
B. | SMALLINT |
C. | MEDIUMINT |
D. | BIGINT |
Answer» C. MEDIUMINT | |
62. |
In MyISAM tables, when a table is emptied with the TRUNCATE TABLE, the counter begins at _____________ |
A. | 0 |
B. | 1 |
C. | -1 |
D. | arbitrary |
Answer» C. -1 | |
63. |
The server is told to accept spaces after function names by _____________ |
A. | –sql-mode=SKIP_SPACE |
B. | –sql-mode=IGNORE_SPACE |
C. | –sql-mode=SPACE_IGNORE |
D. | –sql-mode=SPACE_SKIP |
Answer» C. –sql-mode=SPACE_IGNORE | |
64. |
STRICT_ALL_TABLES turns on stricter checking of data values. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't say |
Answer» B. False | |
65. |
Which mode prevents entry of the ‘zero’ date value in strict mode? |
A. | SUPPRESS |
B. | NO_ZERO_DATE |
C. | PREVENT |
D. | NO_ZERO_IN_DATE |
Answer» C. PREVENT | |
66. |
Which mode is a shorthand for ‘both strict modes plus a bunch of other restrictions’? |
A. | STRICT_ALL_TABLES |
B. | STRICT_TRANS_TABLES |
C. | TRADITIONAL |
D. | ERROR_WHEN_DIVIDE_BY_ZERO |
Answer» D. ERROR_WHEN_DIVIDE_BY_ZERO | |
67. |
For which type are illegal values converted to the appropriate ‘zero’ value? |
A. | Numeric |
B. | String |
C. | ENUM |
D. | TIME |
Answer» E. | |
68. |
By default, MySQL clips out of range numeric values to the nearest fit value. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't say |
Answer» B. False | |
69. |
MySQL works with spatial values in 3 formats. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't say |
Answer» B. False | |
70. |
MEMORY tables do not support BLOB and TEXT indexes. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't say |
Answer» B. False | |
71. |
The maximum non zero value for FLOAT is ___________ |
A. | 3.402823466E+38 |
B. | 3.402823466E+37 |
C. | 3.402823466E+39 |
D. | 3.402823466E+35 |
Answer» B. 3.402823466E+37 | |
72. |
The datatype INT stores ___________ |
A. | 16 bit |
B. | 32 bit |
C. | 48 bit |
D. | 64 bit |
Answer» C. 48 bit | |
73. |
A DEFAULT value cannot be supplied to TEXT types. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't say |
Answer» B. False | |
74. |
How many of the following attributes are allowed only for numeric types? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» C. 3 | |
75. |
A DEFAULT value cannot be supplied to spatial types. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't say |
Answer» B. False | |
76. |
Which data and time datatype stores time value in ‘hh:mm:ss’ format? |
A. | DATE |
B. | TIME |
C. | DATETIME |
D. | TIMESTAMP |
Answer» C. DATETIME | |
77. |
In a MyISAM table, if the maximum value of an AUTO_INCREMENT increment column is 12 and that row is deleted, the next value generated is _____________ |
A. | 12 |
B. | 13 |
C. | 1 |
D. | 14 |
Answer» C. 1 | |
78. |
If an integer column is used for the values in range 1 to 99999, the best suitable datatype is ____________ |
A. | MEDIUMINT SIGNED |
B. | MEDIUMINT UNSIGNED |
C. | SMALLINT SIGNED |
D. | SMALLINT UNSIGNED |
Answer» C. SMALLINT SIGNED | |
79. |
The expression ‘2 BETWEEN 2 AND 5’ results in ____________ |
A. | True |
B. | False |
C. | -1 |
D. | 2 |
Answer» B. False | |
80. |
0x61 + 0 results in _____________ |
A. | 0 |
B. | ‘a’ |
C. | 97 |
D. | arbitrary |
Answer» D. arbitrary | |
81. |
The number of strings among the following matched with ‘%all%’ is _____________ |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» E. | |
82. |
The expression ‘HI’ LIKE NULL results in _____________ |
A. | True |
B. | False |
C. | |
D. | 0 |
Answer» D. 0 | |
83. |
The datatype SMALLINT stores ___________ |
A. | 16 bit |
B. | 32 bit |
C. | 48 bit |
D. | 8 bit |
Answer» B. 32 bit | |
84. |
The maximum size in bytes of a row in MySQL is __________ |
A. | 65534 |
B. | 65535 |
C. | 65536 |
D. | 65537 |
Answer» C. 65536 | |
85. |
Which operator is used to return value from JSON columns after evaluating the path and unquoting the result? |
A. | -> |
B. | ->> |
C. | << |
D. | >> |
Answer» C. << | |
86. |
The ‘LAST_INSERT_ID()’ is tied only to the ‘AUTO_INCREMENT’ values generated during the current connection to the server. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't say |
Answer» B. False | |
87. |
The operator used in PHP to access property of an object is ________________ |
A. | . |
B. | * |
C. | -> |
D. | @ |
Answer» D. @ | |
88. |
On Unix, ‘mysql’ client writes a record of executed statements to a history file. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't say |
Answer» B. False | |
89. |
What is the default format for “Year” data type? |
A. | YYYY |
B. | YYYY-DD-MM |
C. | MM-YYYY-DD |
D. | None of the mentioned |
Answer» B. YYYY-DD-MM | |
90. |
The datatype for single precision floating point number is ____________ |
A. | FLOAT |
B. | DOUBLE |
C. | INT |
D. | BIGINT |
Answer» B. DOUBLE | |
91. |
What is the default format for “Time” data type? |
A. | HHH:MI:SS |
B. | SS:MI:HHH |
C. | MI:SS:HHH |
D. | None of the mentioned |
Answer» B. SS:MI:HHH | |
92. |
What is the default format for “Date” data type? |
A. | YYYY-MM-DD |
B. | MM-YYYY-DD |
C. | DD-MM-YYYY |
D. | None of the mentioned |
Answer» B. MM-YYYY-DD | |
93. |
Which datatype means a variable length non binary string? |
A. | VARCHAR |
B. | BINARY |
C. | VARBINARY |
D. | BLOB |
Answer» B. BINARY | |
94. |
Which data type is more suitable for storing “small notes” in Mysql? |
A. | Char |
B. | Varchar |
C. | Mediumtext |
D. | Longtext |
Answer» D. Longtext | |
95. |
Which among the following is the correct representation of “float(1,1)”? |
A. | Total of 1 digit |
B. | Total of 2 digit |
C. | Total of 2 digit, one digit at right of the decimal, one digit at left of the decimal |
D. | None of the mentioned |
Answer» B. Total of 2 digit | |
96. |
Which among the following is the correct representation of “float(5,0)”? |
A. | 12345.123 |
B. | 12345.1 |
C. | 12345 |
D. | 123.123 |
Answer» D. 123.123 | |
97. |
Which among the following are the correct representation of “float(4,2)”? |
A. | 24.33 |
B. | 124.4 |
C. | 12.123 |
D. | Both 24.33 and 124.4 |
Answer» E. | |
98. |
What will be the storage pattern for “float(4,2)” in Mysql? |
A. | Total of four digits, two to the left of decimal and two to the right of decimal |
B. | Total of six digits |
C. | Total of four digits, not distributed uniformly |
D. | None of the mentioned |
Answer» B. Total of six digits | |
99. |
“Numeric Data” is used to store ____________ |
A. | Whole numbers |
B. | Natural numbers |
C. | Rational numbers |
D. | Both Whole and Natural numbers |
Answer» E. | |
100. |
What is the default format for “Timestamp” data type? |
A. | YYYY-MM-DD HH:MI:SS |
B. | MM-YYYY-DD HH:MI:SS |
C. | DD-YYYY-MM MI:HH:SS |
D. | None of the mentioned |
Answer» B. MM-YYYY-DD HH:MI:SS | |