Home > Databases > Quizzes > MySQL Basics Practice Test: MySQL Programs Using C
MySQL Basics Practice Test: MySQL Programs Using C
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 55% Most missed: “When linking to a static MySQL C client library, the client library and the clie…”

Quiz questions on compiling and linking client programs, server connection, error handling, processing SQL statements, embedded server library, multiple statement execution.
To connect a C program to MySQL, you need to use a MySQL Connector library that acts as an interface between the C program and the MySQL database. One popular option is the MySQL Connector/C, which is a library written in C that implements the database connectivity API to the MySQL database.

Related Test: MySQL Basics Practice Test: MySQL Programs And APIs

MySQL Basics Practice Test: MySQL Programs Using C
Time left 00:00
25 Questions

1. Converting a client/server application to embedded server is simpler.
2. Which of these is preferred when stored procedures are not being used?
CLIENT_MULTI_STATEMENTS, mysql_set_server_option()
3. How many of the following use NULL to indicate failure?
mysql_init(), mysql_real_connect()
4. The binary protocol does not support all statements.
5. When linking to a static MySQL C client library, the client library and the client application must use the same compiler option.
6. Which character is illegal in naming an unquoted identifier in SQL?
7. Which of the following returns a MySQL-specific numeric code?
8. Which of these can be used in place of MYSQL_SERVER_VERSION?
9. How many of the following is considered as a special character by ‘mysql_real_escape_string()’?
null byte, single quote, backslash
10. The ‘SOCKET’ protocol is permitted on which operating systems?
11. Which of the following can be used interchangeably with MYSQL_VERSION_ID?
12. When building from source, the embedded server library is enabled by _______________
13. How many of the following take a connection handler as an argument?
mysql_store_result(), mysql_use_result()
14. Input handling cannot be customized with MySQL.
15. How many of the following is (are) considered as a special character by ‘mysql_real_escape_string()’?
null byte, single quote, backslash
16. How many of the following does not return a value?
mysql_close(), mysql_init, mysql_real_connect
17. mysql_init() returns a _____________
18. Which flag is used to compile client programs that use MySQL header files?
19. Which option is supplied to ensure TCP/IP connection to local server?
20. The MySQL clients are linked with _____________
21. Connections to remote servers always use TCP/IP.
22. The static C library client in Windows is _____________
23. mysql_store_result() does not return a result set.
24. Which option enables multiple-statement execution?
25. Which header should be included first?