This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Choosing an API”.
1. Which of these is the most general purpose language?
a) C
b) Perl
c) Python
d) PHP
View Answer
Explanation: C is a general purpose language, so in principle it can be used for anything. C tends to be used more often for standalone programs rather than for Web programming in practice.
2. Among the following, for which language is image processing least simple?
a) PHP
b) Perl
c) Python
d) C
View Answer
Explanation: It is not as easy to perform text processing and memory management in C than it is in languages like Perl and PHP. These capabilities tend to be heavily used in the web applications.
3. The CGI.pm module for website development is a part of _____________
a) Perl
b) Java
c) Python
d) C++
View Answer
Explanation: Like C, Perl is also suitable for writing standalone programs. However, Perl is quite useful for Web site development. The CGI.pm module of Perl can be extensively used for it.
4. Compiled programs execute faster than interpreted scripts.
a) True
b) False
View Answer
Explanation: For interpreted languages used in web development, the performance is better when the interpreter is invoked as a module which is a part of the Web server itself. Compiler is faster generally.
5. For a heavily used program, which of these languages should be preferred?
a) C
b) Perl
c) PHP
d) Python
View Answer
Explanation: C is compiled while Perl and PHP are interpreted. So C programs generally will run faster than Perl or PHP scripts. Therefore C should be the best choice for a heavily used program.
6. The protocol CGI is _____________
a) computer graphics interface
b) common graphics interface
c) computer gateway interface
d) common gateway interface
View Answer
Explanation: The web server ‘Apache’ uses the interpreters as some CGI programs. This means that it communicates with these programs using the popular ‘Common Gateway Interface (CGI)’ protocol.
7. There is a startup penalty for a standalone interpreter.
a) True
b) False
View Answer
Explanation: The startup penalty for a standalone interpreter makes it give at least an order of magnitude poorer performance than the module interpreter. Interpreters also have a setup cost.
8. Which of these has a bigger memory footprint?
Perl, PHP
a) Perl
b) PHP
c) same
d) machine dependent
View Answer
Explanation: A clearly significant difference between Perl and PHP is that Perl has a bigger memory footprint than PHP. Apache processes are larger with ‘mod_perl’ linked in than with ‘mod_php’.
9. Which is the correct decreasing order for highly developed text manipulation capabilities?
a) Perl, PHP, C
b) Perl, C, PHP
c) PHP, Perl, C
d) C, PHP, Perl
View Answer
Explanation: Perl has the most highly developed capabilities in terms of text manipulation, and PHP follows it in the order. C is very rudimentary by comparison. It has the least simplicity.
10. Which API provides the lowest level interface to the server?
a) C API
b) Perl
c) PHP
d) Python
View Answer
Explanation: The C Application Programming Interface provides the lowest level interface to the server. It enforces the least policy. Therefore it provides the least amount of safety net.
Sanfoundry Global Education & Learning Series – MySQL Database.
To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Apply for Programming Internship
- Check MySQL Books
- Practice Programming MCQs
- Check Information Technology Books