250+ TOP MCQs on Choosing an API and Answers Online Quiz

MySQL Database Multiple Choice Questions on “Choosing an API”.

1. Which of these is the most general purpose language?
a) C
b) Perl
c) Python
d) PHP

Answer: a
Clarification: 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

Answer: d
Clarification: 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++

Answer: a
Clarification: 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

Answer: a
Clarification: 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

Answer: a
Clarification: 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

Answer: d
Clarification: 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

Answer: a
Clarification: 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

Answer: a
Clarification: 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

Answer: a
Clarification: 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

Answer: a
Clarification: 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.

Leave a Reply

Your email address will not be published. Required fields are marked *