DB2 Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to DB2. You will have to
read all the given answers and click over the correct answer. If you are not sure about the answer
then you can check the answer using Show Answer button. You can use Next
Quiz button to check new set of questions in the quiz.
Q 1 - Which component checks DB2 deadlocks?
A - Locking Services Component
B - System Services Component
C - Database Services Component
D - Stored Procedures Component
Answer : A
Explanation
Locking services are provided by Locking services component which is known as Internal
Resource Lock Manager (IRLM) and manages concurrency issues and dead locks.
Hide Answer
Q 2 - Which columns are not good for indexing?
A - Frequently updated columns
B - More than 30 characters of data
C - Have redundant values
D - All of these
Answer : D
Explanation
The purpose of index is to retrieve the data faster. So we choose those columns which are unique
or less frequently updated.
Hide Answer
Q 3 - How many primary keys can be declared on a table?
A - No Limit
B - Only 1
C-5
D - 10
Answer : B
Explanation
A table can have only one primary key.
Hide Answer
Q 4 - What does application plan contains?
A - DBRM
B - Package
C - Both A & B
D - None of these
Answer : C
Explanation
Application plan consists of one or more DBRM & application package which is kept in buffer
pool during program execution.
Hide Answer
Q 5 - Which command is used to start an instance on DB2?
A - STARTDB2
B - DB2START
C - DB2STOP
D - RUNDB2
Answer : B
Explanation
DB2START command is used to start an instance on DB2.
Hide Answer
Q 6 - Which isolation level ensures highest data integrity?
A - Repeatable Read
B - Read Stability
C - Cursor Stability
D - Uncommitted Read
Hide Answer
Q 7 - Which command is use to drop an existing plan?
A - DROP
B - FREE
C - DELETE
D - None of these
Show Answer
Q 8 - Exclusive locks are taken for INSERT, UPDATE and DELETE
purposes. State whether true or false?
A - False
B - True
Answer : B
Explanation
This is self explanatory.
Hide Answer
Q 9 - SQLCA is a SQL communication area through which DB2 passes
feedback of SQL execution to the program. It tells the program
whether execution was successful or not. State whether true or
false?
A - False
B - True
Answer : B
Explanation
This statement is correct.
Hide Answer
Q 10 - What is the physical storage length of DATE data
type?
A - 4 bytes
B - 3 bytes
C - 10 bytes
D - 20 bytes
Answer : A
Explanation
DATE data types take 4 bytes and default is 'YYYY-MM-DD'
DB2 Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related
to DB2. You will have to read all the given answers and click over
the correct answer. If you are not sure about the answer then you
can check the answer using Show Answer button. You can
use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which component checks DB2 deadlocks?
A - Locking Services Component
B - System Services Component
C - Database Services Component
D - Stored Procedures Component
Answer : A
Explanation
Locking services are provided by Locking services component which
is known as Internal Resource Lock Manager (IRLM) and manages
concurrency issues and dead locks.
Hide Answer
Q 2 - Which columns are not good for indexing?
A - Frequently updated columns
B - More than 30 characters of data
C - Have redundant values
D - All of these
Hide Answer
Q 3 - How many primary keys can be declared on a table?
A - No Limit
B - Only 1
C-5
D - 10
Answer : B
Explanation
A table can have only one primary key.
Hide Answer
Q 4 - What does application plan contains?
A - DBRM
B - Package
C - Both A & B
D - None of these
Answer : C
Explanation
Application plan consists of one or more DBRM & application
package which is kept in buffer pool during program execution.
Hide Answer
Q 5 - Which command is used to start an instance on DB2?
A - STARTDB2
B - DB2START
C - DB2STOP
D - RUNDB2
Answer : B
Explanation
DB2START command is used to start an instance on DB2.
Hide Answer
Q 6 - Which isolation level ensures highest data integrity?
A - Repeatable Read
B - Read Stability
C - Cursor Stability
D - Uncommitted Read
Hide Answer
Q 7 - Which command is use to drop an existing plan?
A - DROP
B - FREE
C - DELETE
D - None of these
Answer : B
Explanation
FREE command is used to drop an existing plan.
Hide Answer
Q 8 - Exclusive locks are taken for INSERT, UPDATE and
DELETE purposes. State whether true or false?
A - False
B - True
Hide Answer
Q 9 - SQLCA is a SQL communication area through which DB2
passes feedback of SQL execution to the program. It tells
the program whether execution was successful or not. State
whether true or false?
A - False
B - True
Answer : B
Explanation
This statement is correct.
Hide Answer
Q 10 - What is the physical storage length of DATE data
type?
A - 4 bytes
B - 3 bytes
C - 10 bytes
D - 20 bytes
Answer : A
Explanation
DATE data types take 4 bytes and default is 'YYYY-MM-DD'
C++ Mock Test
This section presents you various set of Mock Tests related to C++
Framework. You can download these sample mock tests at your
local machine and solve offline at your convenience. Every mock
test is supplied with a mock test key to let you verify the final score
and grade yourself.
Mock Test I Mock Test II Mock Test III Mock
Test IV
C++ Mock Test I
Q 1 - The default access specifer for the class members is
A - public
B - private
C - protected
D - None of the above.
Q 2 - A trigraph character begins with
A-#
B - ##
C-?
D - ??
Q 3 - C++ does not supports the following
A - Multilevel inheritance
B - Hierarchical inheritance
C - Hybrid inheritance
D - None of the above.
Q 4 - One of the following is true for an inline function.
A - It executes faster as it is treated as a macro internally
B - It executes faster because it priority is more than normal function
C - It doesn’t executes faster compared to a normal function
D - None of the above holds true for an inline function
Q 5 - Choose the pure virtual function definition from the
following.
A - virtual void f()=0 { }
B - void virtual f()=0 { }
C - virtual void f() {} = 0;
D - None of the above.
Q 6 - Abstract class is __
A - A class must contain all pure virtual functions
B - A class must contain at least one pure virtual function
C - A class may not contain pure virtual function.
D - A class must contain pure virtual function defined outside the class.
Q 7 - What is the output of the following program?
#include<iostream>
using namespace std;
class abc {
void f();
void g();
int x;
};
main() {
cout<<sizeof(abc)<<endl;
}
A - 12
B-4
C-8
D - Compile error
Q 8 - What is the output of the following program?
#include<iostream>
using namespace std;
class abc {
public:
static int x;
int i;
abc() {
i = ++x;
}
};
int abc::x;
main() {
abc m, n, p;
cout<<m.x<<" "<<m.i<<endl;
}
A-31
B-33
C-11
D-13
Q 9 - A constructor can be virtual.
A - True
B - False
Q 10 - Choose the operator which cannot be overloaded.
A-/
B - ()
C - ::
D-%
Q 11 - Which operator is required to be overloaded as
member function only?
A-_
B-__
C - ++ (postfix version)
D-=
Q 12 - Which of the following is not the keyword in C++?
A - volatile
B - friend
C - extends
D - this
Q 13 - What is the output of the following program?
#include<iostream>
using namespace std;
class abc {
public:
int i;
abc(int i) {
i = i;
}
};
main() {
abc m(5);
cout<<m.i;
}
A-5
B - Garbage
C - Error at the statement i=i;
D - Compile error: ‘i’ declared twice.
Q 14 - By default the members of the structure are
A - private
B - protected
C - public
D - Access specifiers not applicable for structures.
Q 15 - From the below class choose the proper definition of
the member function f().
template <class T>
class abc {
void f();
};
A - template <class T>
void abc<T>::f() { }
B - template<class T>
void abc::f() { }
C - template<T>
void abc<class T>::f() { }
D - template<T>
void abc<T>::f() { }
Q 16 - Choose the respective delete operator usage for the
expression ‘ptr=new int[100]’.
A - delete ptr;
B - delete ptr[];
C - delete[] ptr;
D - []delete ptr;
Q 17 - ‘cin’ is an __
A - Class
B - Object
C - Package
D - Namespace
Q 18 - The operator used to access member function of a
structure using its object.
A-.
B - ->
C-*
D - None of the above.
Q 19 - A user defined header file is included by following
statement in general.
A - #include “file.h”
B - #include <file.h>
C - #include <file>
D - #include file.h
Q 20 - Which data type can be used to hold a wide character
in C++?
A - unsigned char;
B - int
C - wchar_t
D - none of the above.
Q 21 - Which is the storage specifier used to modify the
member variable even though the class object is a constant
object?
A - auto
B - register
C - static
D - mutable
Q 22 - The following operator can be used to calculate the
value of one number raised to another.
A-^
B - **
C - ^^
D -None of the above
Q 23 - Pick up the valid declaration for overloading ++ in
postfix form where T is the class name.
A - T operator++();
B - T operator++(int);
C - T& operator++();
D - T& operator++(int);
Q 24 - We can have varying number of arguments for the
overloaded form of () operator.
A - True
B - False
Q 25 - Operators sizeof and ?:
A - Both can be overloaded
B - Both cannot be overloaded
C - Only sizeof can be overloaded
D - Only ?: can be overloaded
Question Number Answer Key
1 B
2 C
3 D
4 A
5 D
6 B
7 B
8 A
9 B
10 C
11 D
12 C
13 B
14 C
15 A
16 C
17 B
18 A
19 A
20 C
21 D
22 D
23 B
24 A
25 B
Java Mock Test I
Q 1 - What is correct syntax for main method of a java class?
A - public static int main(String[] args)
B - public int main(String[] args)
C - public static void main(String[] args)
D - None of the above.
Q 2 - Which of the following is not a keyword in java?
A - static
B - Boolean
C - void
C - private
Q 3 - What is a class in java?
A - A class is a blue print from which individual objects are created. A class
can contain fields and methods to describe the behavior of an object.
B - class is a special data type.
C - class is used to allocate memory to a data type.
D - none of the above.
Q 4 - Primitive variables are stored on Stack.
A - True
B - False
Q 5 - Objects are stored on Stack.
A - True
B - False
Q 6 - Static functions can be accessed using null reference.
A - True
B - False
Q 7 - Can we compare int variable with a boolean variable?
A - True
B - False
Q 8 - What of the following is the default value of a local
variable?
A - null
B-0
C - Depends upon the type of variable
D - Not assigned
Q 9 - What of the following is the default value of an
instance variable?
A - null
B-0
C - Depends upon the type of variable
D - Not assigned
Q 10 - What is the size of byte variable?
A - 8 bit
B - 16 bit
C - 32 bit
D - 64 bit
Q 11 - What is the size of short variable?
A - 8 bit
B - 16 bit
C - 32 bit
D - 64 bit
Q 12 - What is the size of int variable?
A - 8 bit
B - 16 bit
C - 32 bit
D - 64 bit
Q 13 - What is the size of long variable?
A - 8 bit
B - 16 bit
C - 32 bit
D - 64 bit
Q 14 - What is the size of float variable?
A - 8 bit
B - 16 bit
C - 32 bit
D - 64 bit
Q 15 - What is the size of double variable?
A - 8 bit
B - 16 bit
C - 32 bit
D - 64 bit
Q 16 - What is the size of char variable?
A - 8 bit
B - 16 bit
C - 32 bit
D - 64 bit
Q 17 - What is the size of boolean variable?
A - 8 bit
B - 16 bit
C - 32 bit
D - not precisely defined
Q 18 - Is an empty .java file a valid source file?
A - True
B - False
Q 19 - Can we have multiple classes in same java file?
A - True
B - False
Q 20 - Can we have two public classes in one java file?
A - True
B - False
Q 21 - What is the default value of byte variable?
A - 0
B - 0.0
B - null
B - undefined
Q 22 - What is the default value of short variable?
A - 0.0
B - 0
B - null
B - undefined
Q 23 - What is the default value of byte variable?
A-0
B - 0.0
C - null
D - not defined
Q 24 - What is the default value of short variable?
A - 0.0
B-0
C - null
D - not defined
Q 25 - What is the default value of int variable?
A-0
B - 0.0
C - null
D - not defined
Question Number Answer Key
1 C
2 B
3 A
4 A
5 B
6 B
7 B
8 D
9 C
10 A
11 B
12 C
13 D
14 C
15 D
16 B
17 B
18 A
19 A
20 B
21 A
22 A
23 A
24 B
25 A
HTML5 Mock Test
This section presents you various set of Mock Tests related
to HTML5 Framework. You can download these sample mock tests
at your local machine and solve offline at your convenience. Every
mock test is supplied with a mock test key to let you verify the final
score and grade yourself.
Mock Test I Mock Test II Mock Test III Mock
Test IV
HTML5 Mock Test I
Q 1 - Which of the following is true about HTML 5?
A - HTML5 is the next major revision of the HTML standard superseding HTML
4.01, XHTML 1.0, and XHTML 1.1.
B - HTML5 is a standard for structuring and presenting content on the World
Wide Web.
C - HTML5 is a cooperation between the World Wide Web Consortium (W3C)
and the Web Hypertext Application Technology Working Group (WHATWG).
D - All of the above.
Q 2 - Which of the following feature is a part of HTML 5?
A - Persistent Local Storage
B - WebSocket
C - Server-Sent Events
D - All of the above.
Q 3 - Which of the following feature is a part of HTML 5?
A - Canvas
B - Audio & Video
C - Geolocation
D - All of the above.
Q 4 - Which of the following browser supports HTML5 in its
latest version?
A - Apple Safari
B - Google Chrome
C - Both of the above.
D - None of the above.
Q 5 - Which of the following browser supports HTML5 in its
latest version?
A - Mozilla Firefox
B - Opera
C - Both of the above.
D - None of the above.
Q 6 - Which of the following browser supports HTML5 in its
latest version?
A - Mozilla Firefox
B - Opera
C - Both of the above.
D - None of the above.
Q 7 - Is HTML5 backward compatible with old browsers?
A - true
B - false
Q 8 - Are HTML tags case sensitive?
A - true
B - false
Q 9 - Which of the following tag represents a generic
document or application section in HTML5?
A - section
B - article
C - aside
D - header
Q 10 - Which of the following tag represents an independent
piece of content of a document in HTML5?
A - section
B - article
C - aside
D - header
Q 11 - Which of the following tag represents a piece of
content that is only slightly related to the rest of the page in
HTML5?
A - section
B - article
C - aside
D - header
Q 12 - Which of the following tag represents the header of a
section in HTML5?
A - section
B - article
C - aside
D - header
Q 13 - Which of the following tag represents the footer of a
section in HTML5?
A - footer
B - nav
C - section
D - dialog
Q 14 - Which of the following tag represents a section of the
document intended for navigation in HTML5?
A - footer
B - nav
C - section
D - dialog
Q 15 - Which of the following tag represents a section of the
document intended for navigation in HTML5?
A - footer
B - nav
C - section
D - dialog
Q 16 - Which of the following tag can be used to mark up a
conversation in HTML5?
A - footer
B - nav
C - dialog
D - figure
Q 17 - Which of the following tag can be used to associate a
caption together with some embedded content in HTML5?
A - footer
B - nav
C - dialog
D - figure
Q 18 - Which of the following is correct about custom
attributes in HTML5?
A - A custom data attribute starts with data- and would be named based on
your requirement.
B - You would be able to get the values of these attributes using JavaScript
APIs or CSS in similar way as you get for standard attributes.
C - Both of the above.
D - None of the above.
Q 19 - Which of the following is correct about custom
attributes in HTML5?
A - A custom data attribute starts with data- and would be named based on
your requirement.
B - You would be able to get the values of these attributes using JavaScript
APIs or CSS in similar way as you get for standard attributes.
C - Both of the above.
D - None of the above.
Q 20 - Which of the following is correct about Web form 2.0
in HTML5?
A - Web Forms 2.0 is an extension to the forms features found in HTML4.
B - Form elements and attributes in HTML5 provide a greater degree of
semantic mark-up than HTML4.
C - Form elements and attributes in HTML5 remove a great deal of the need
for tedious scripting and styling that was required in HTML4.
D - All of the above.
Q 21 - Which of the following is correct about Web form 2.0
in HTML5?
A - Web Forms 2.0 is an extension to the forms features found in HTML4.
B - Form elements and attributes in HTML5 provide a greater degree of
semantic mark-up than HTML4.
C - Form elements and attributes in HTML5 remove a great deal of the need
for tedious scripting and styling that was required in HTML4.
D - All of the above.
Q 22 - Which of the following input control represents a date
and time (year, month, day, hour, minute, second, fractions
of a second) encoded according to ISO 8601 with the time
zone set to UTC in Web Form 2.0?
A - datetime
B - datetime-local
C - date
D - month
Q 23 - Which of the following input control represents a date
and time (year, month, day, hour, minute, second, fractions
of a second) encoded according to ISO 8601 with no time
zone information in Web Form 2.0?
A - datetime
B - datetime-local
C - date
D - month
Q 24 - Which of the following input control represents a date
(year, month, day) encoded according to ISO 8601 in Web
Form 2.0?
A - datetime
B - datetime-local
C - date
D - month
Q 25 - Which of the following input control represents a date
consisting of a year and a month encoded according to ISO
8601 in Web Form 2.0?
A - datetime
B - datetime-local
C - date
D - month
Question Number Answer Key
1 D
2 D
3 D
4 C
5 C
6 C
7 A
8 B
9 A
10 B
11 C
12 D
13 A
14 B
15 B
16 C
17 D
18 C
19 C
20 D
21 D
22 A
23 B
24 C
25 D
Download
Javascript Mock Test
This section presents you various set of Mock Tests related
to Javascript Framework. You can download these sample mock
tests at your local machine and solve offline at your convenience.
Every mock test is supplied with a mock test key to let you verify
the final score and grade yourself.
Mock Test I Mock Test II Mock Test III Mock
Test IV
Javascript Mock Test I
Q 1 - Which of the following is correct about JavaScript?
A - JavaScript is a lightweight, interpreted programming language.
B - JavaScript has object-oriented capabilities that allows you to build
interactivity into otherwise static HTML pages.
C - The general-purpose core of the language has been embedded in
Netscape, Internet Explorer, and other web browsers.
D - All of the above.
Q 2 - Which of the following is correct about features of
JavaScript?
A - JavaScript is a lightweight, interpreted programming language.
B - JavaScript is designed for creating network-centric applications.
C - JavaScript is complementary to and integrated with Java.
D - All of the above.
Q 3 - Which of the following is correct about features of
JavaScript?
A - JavaScript is is complementary to and integrated with HTML.
B - JavaScript is open and cross-platform.
C - Both of the above.
D - All of the above.
Q 4 - Which of the following is an advantage of using
JavaScript?
A - Less server interaction
B - Immediate feedback to the visitors
C - Increased interactivity
D - All of the above.
Q 5 - Which of the following is a disadvantage of using
JavaScript?
A - Client-side JavaScript does not allow the reading or writing of files.
B - JavaScript can not be used for Networking applications because there is
no such support available.
C - JavaScript doesn't have any multithreading or multiprocess capabilities.
D - All of the above.
Q 6 - Is JavaScript a case-sensitive language?
A - true
B - false
Q 7 - Which of the following is true about variable naming
conventions in JavaScript?
A - You should not use any of the JavaScript reserved keyword as variable
name.
B - JavaScript variable names should not start with a numeral (0-9).
C - Both of the above.
D - None of the above.
Q 8 - Which of the following is true about variable naming
conventions in JavaScript?
A - JavaScript variable names must begin with a letter or the underscore
character.
B - JavaScript variable names are case sensitive.
C - Both of the above.
D - None of the above.
Q 9 - Which of the following is true about typeof operator in
JavaScript?
A - The typeof is a unary operator that is placed before its single operand,
which can be of any type.
B - Its value is a string indicating the data type of the operand.
C - Both of the above.
D - None of the above.
Q 10 - Can you access Cookie using javascript?
A - true
B - false
Q 11 - Which of the following is true about cookie handling
in JavaScript?
A - JavaScript can manipulate cookies using the cookie property of the
Document object.
B - JavaScript can read, create, modify, and delete the cookie or cookies that
apply to the current web page.
C - Both of the above.
D - None of the above.
Q 12 - Which of the following is the correct syntax to create
a cookie using JavaScript?
A - [Link] = 'key1 = value1; key2 = value2; expires = date';
B - [Link] = 'key1 = value1; key2 = value2; expires = date';
C - [Link] = 'key1 = value1; key2 = value2; expires = date';
D - [Link] = 'key1 = value1; key2 = value2; expires = date';
Q 13 - Which of the following is the correct syntax to
redirect a url using JavaScript?
A - [Link]='[Link]
B - [Link]='[Link]
C - [Link]='[Link]
D - [Link]='[Link]
Q 14 - Which of the following is the correct syntax to print a
page using JavaScript?
A - [Link]();
B - [Link]();
C - [Link]();
D - [Link]();
Q 15 - Which of the following is a valid type of function
javascript supports?
A - named function
B - anonymous function
C - Both of the above.
D - None of the above.
Q 16 - Can you assign a anonymous function to a variable?
A - true
B - false
Q 17 - Can you pass a anonymous function as an argument
to another function?
A - true
B - false
Q 18 - How can you get the type of arguments passed to a
function?
A - using typeof operator
B - using getType function
C - Both of the above.
D - None of the above.
Q 19 - How can you get the total number of arguments
passed to a function?
A - Using [Link] property
B - Using [Link] property
C - Both of the above.
D - None of the above.
Q 20 - Which of the following type of variable is visible
everywhere in your JavaScript code?
A - global variable
B - local variable
C - Both of the above.
D - None of the above.
Q 21 - Which of the following type of variable is visible only
within a function where it is defined?
A - global variable
B - local variable
C - Both of the above.
D - None of the above.
Q 22 - Which of the following type of variable takes
precedence over other if names are same?
A - global variable
B - local variable
C - Both of the above.
D - None of the above.
Q 23 - Which of the following is correct about callbacks?
A - A callback is a plain JavaScript function passed to some method as an
argument or option.
B - Some callbacks are just events, called to give the user a chance to react
when a certain state is triggered.
C - Both of the above.
D - None of the above.
Q 24 - Which built-in method returns the character at the
specified index?
A - characterAt()
B - getCharAt()
C - charAt()
D - None of the above.
Q 25 - Which built-in method combines the text of two
strings and returns a new string?
A - append()
B - concat()
C - attach()
D - None of the above.
Question Number Answer Key
1 D
2 D
3 C
4 D
5 D
6 A
7 C
8 C
9 C
10 A
11 C
12 A
13 D
14 A
15 C
16 A
17 A
18 A
19 B
20 A
21 B
22 B
23 C
24 C
25 B
Download
PHP Mock Test
This section presents you various set of Mock Tests related to PHP.
You can download these sample mock tests at your local machine
and solve offline at your convenience. Every mock test is supplied
with a mock test key to let you verify the final score and grade
yourself.
Mock Test I Mock Test II Mock Test III Mock
Test IV
PHP Mock Test I
Q 1 - Which of the following is correct about PHP?
A - PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
B - PHP is a server side scripting language that is embedded in HTML.
C - It is used to manage dynamic content, databases, session tracking, even
build entire e-commerce sites.
D - All of the above.
Q 2 - Which of the following is correct about PHP?
A - PHP performs system functions, i.e. from files on a system it can create,
open, read, write, and close them.
B - PHP can handle forms, i.e. gather data from files, save data to a file, thru
email you can send data, return data to the user.
C - You add, delete, modify elements within your database thru PHP.
D - All of the above.
Q 3 - Which of the following is correct about PHP?
A - PHP can access cookies variables and set cookies.
B - Using PHP, you can restrict users to access some pages of your website.
C - It can encrypt data.
D - All of the above.
Q 4 - Using which of the following way can you embed PHP
code in an HTML page?
A - <?php PHP code goes here ?>
B - <? PHP code goes here ?>
C - <script language="php"> PHP code goes here </script>
D - All of the above.
Q 5 - Which of the following is true about [Link] file?
A - The PHP configuration file, [Link], is the final and most immediate way to
affect PHP's functionality.
B - The [Link] file is read each time PHP is initialized.
C - Both of the above.
D - None of the above.
Q 6 - Which of the following is true about [Link] file?
A - The PHP configuration file, [Link], is the final and most immediate way to
affect PHP's functionality.
B - The [Link] file is read each time PHP is initialized.
C - Both of the above.
D - None of the above.
Q 7 - Is PHP whitespace sensitive?
A - false
B - true
Q 8 - Is PHP case sensitive?
A - false
B - true
Q 9 - Which of the following is true about php variables?
A - All variables in PHP are denoted with a leading dollar sign ($).
B - The value of a variable is the value of its most recent assignment.
C - Variables are assigned with the = operator, with the variable on the left-
hand side and the expression to be evaluated on the right.
D - All of the above.
Q 10 - Which of the following is true about php variables?
A - Variables can, but do not need, to be declared before assignment.
B - Variables in PHP do not have intrinsic types - a variable does not know in
advance whether it will be used to store a number or a string of characters.
C - Variables used before they are assigned have default values.
D - All of the above.
Q 11 - Which of the following type of variables are whole
numbers, without a decimal point, like 4195?
A - Integers
B - Doubles
C - Booleans
D - Strings
Q 12 - Which of the following type of variables are floating-
point numbers, like 3.14159 or 49.1?
A - Integers
B - Doubles
C - Booleans
D - Strings
Q 13 - Which of the following type of variables have only two
possible values either true or false?
A - Integers
B - Doubles
C - Booleans
D - Strings
Q 14 - Which of the following type of variables are special
type that only has one value: NULL?
A - Strings
B - Doubles
C - Booleans
D - NULL
Q 15 - Which of the following type of variables are
sequences of characters, like 'PHP supports string
operations.'?
A - Strings
B - Arrays
C - Objects
D - Resources
Q 16 - Which of the following type of variables are named
and indexed collections of other values?
A - Strings
B - Arrays
C - Objects
D - Resources
Q 17 - Which of the following type of variables are instances
of programmer-defined classes?
A - Strings
B - Arrays
C - Objects
D - Resources
Q 18 - Which of the following type of variables are special
variables that hold references to resources external to PHP
(such as database connections)?
A - Strings
B - Arrays
C - Objects
D - Resources
Q 19 - Which of the following is correct about variable
naming rules?
A - Variable names must begin with a letter or underscore character.
B - A variable name can consist of numbers, letters, underscores.
C - you cannot use characters like + , - , % , ( , ) . & , etc in a variable name.
D - All of the above.
Q 20 - Which of the following is correct about determine the
"truth" of any value not already of the Boolean type?
A - If the value is a number, it is false if exactly equal to zero and true
otherwise.
B - If the value is a string, it is false if the string is empty (has zero
characters) or is the string "0", and is true otherwise.
C - Values of type NULL are always false.
D - All of the above.
Q 21 - Which of the following is correct about determine the
"truth" of any value not already of the Boolean type?
A - If the value is an array, it is false if it contains no other values, and it is
true otherwise. For an object, containing a value means having a member
variable that has been assigned a value.
B - Valid resources are true (although some functions that return resources
when they are successful will return FALSE when unsuccessful).
C - Don't use double as Booleans.
D - All of the above.
Q 22 - Which of the following is correct about NULL?
A - NULL is a special type that only has one value: NULL.
B - The special constant NULL is capitalized by convention, but actually it is
case insensitive.
C - Both of the above.
D - None of the above.
Q 23 - Which of the following is correct about NULL?
A - A variable that has been assigned NULL evaluates to FALSE in a Boolean
context.
B - A variable that has been assigned NULL returns FALSE when tested with
IsSet() function.
C - Both of the above.
D - None of the above.
Q 24 - Which of the following is correct about constants?
A - To define a constant you have to use define() function.
B - To retrieve the value of a constant, you have to simply specify its name.
C - Both of the above.
D - None of the above.
Q 25 - Which of the following is correct about constants?
A - Unlike with variables, you do not need to have a constant with a $.
B - Only scalar data (boolean, integer, float and string) can be contained in
constants.
C - Both of the above.
D - None of the above.
Question Number Answer Key
1 D
2 D
3 D
4 D
5 C
6 C
7 A
8 B
9 D
10 D
11 A
12 B
13 C
14 D
15 A
16 B
17 C
18 D
19 D
20 D
21 D
22 C
23 C
24 C
25 C
Download