ExamVeda
Login
Home
This question belongs to MySQL MySQL Miscellaneous
MySQL Miscellaneous
?

Which of the following use 'NULL' to indicate failure?
mysql_init(), mysql_real_connect()

Answer & Solution
Correct Answer: Option C
This question is about how MySQL functions handle errors.
In MySQL, functions often use the special value NULL to signal that something went wrong.
The functions mentioned, mysql_init() and mysql_real_connect(), are used for setting up a connection to a MySQL database.
If either of these functions fails, they will return NULL.
So, the correct answer is None of the above. The question is designed to trick you into thinking about numerical error codes, but MySQL uses NULL to represent errors in these cases.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.