Unlimited Online Free Software Download! Get 100% Free
Hurry up!
Location: Bapunagar
Call: 800 053 0134
Email: info@hitechskillindia.in
Courses
CCC
Accounting
Software Development
Designing
Mobile Development
Digital Marketing
Specialized Courses
Live Project Training
Home
About
Placement Student's
Quiz
CCC Quiz
TallyPrime + GST Quiz
C, C++ Quiz
PHP Quiz
Laravel Quiz
React Quiz
NodeJS Quiz
Python Quiz
Java Quiz
WordPress Quiz
Digital Marketing Quiz
Front-End Quiz
Fullstack PHP Quiz
Fullstack Python Quiz
Fullstack Java Quiz
Fullstack WordPress Quiz
Fullstack NodeJS Quiz
Blog
Contact
E-Brochure
hot
Gallery
Career
We Are Hiring
Test Exam
Increase your skills
Inquiry Now
Home
About Us
Courses
CCC
Accounting
Software Development
hot
Designing
Mobile Development
new
Digital Marketing
Specialized Courses
new
Live Project Training
hot
Placement Student's
Quiz
CCC Quiz
TallyPrime + GST Quiz
C, C++ Quiz
PHP Quiz
Laravel Quiz
React Quiz
NodeJS Quiz
Python Quiz
Java Quiz
WordPress Quiz
Digital Marketing Quiz
Front-End Quiz
Fullstack PHP Quiz
Fullstack Python Quiz
Fullstack Java Quiz
Fullstack WordPress Quiz
Fullstack NodeJS Quiz
Blog
Contact Us
More
New
E-Brochure
hot
Gallery
Career
We Are Hiring
Test Exam
Increase your skills
Fullstack NodeJS Quiz
Home
Quiz
Fullstack NodeJS Quiz
Change Course
CCC Quiz
TallyPrime + GST Quiz
C, C++ Quiz
PHP Quiz
Laravel Quiz
React Quiz
NodeJS Quiz
Python Quiz
Java Quiz
WordPress Quiz
Digital Marketing Quiz
Front-End Quiz
Fullstack PHP Quiz
Fullstack Python Quiz
Fullstack Java Quiz
Fullstack WordPress Quiz
Fullstack NodeJS Quiz
Q.
1
Which database is commonly used with Node.js applications?
A.
MongoDB
B.
MySQL
C.
PostgreSQL
D.
All of the above
Correct Answer:
D. All of the above
Q.
2
What is the 16-bit compiler allowable range for integer constants ?
A.
-3.4e38 to 3.4e38
B.
-32767 to 32768
C.
-32668 to 32667
D.
-32768 to 32767
Correct Answer:
D. -32768 to 32767
Q.
3
What is required in each C program ?
A.
The program must have at least one function.
B.
The program does not require any function.
C.
Input data
D.
Output data
Correct Answer:
A. The program must have at least one function.
Q.
4
Which of the following comment is correct when a macro definition includes arguments ?
A.
The opening parenthesis should immediately follow the macro name.
B.
There should be at least one blank between the macro name and the opening parenthesis
C.
There should be only one blank between the macro name and the opening parenthesis.
D.
All the above comments are correct.
Correct Answer:
A. The opening parenthesis should immediately follow the macro name.
Q.
5
What is a lint ?
A.
C compiler
B.
Interactive debugger
C.
Analyzing tool
D.
C interpreter
Correct Answer:
C. Analyzing tool
Q.
6
What is the output of this statement ''printf(''%d'', (a++))'' ?
A.
The value of (a + 1)
B.
The current value of a
C.
Error message
D.
Garbage
Correct Answer:
B. The current value of a
Q.
7
Why is a macro used in place of a function ?
A.
It reduces execution time.
B.
It reduces code size.
C.
It increases execution time.
D.
It increases code size.
Correct Answer:
A. It reduces execution time.
Q.
8
In the C language, the constant is defined _______.
A.
Before main
B.
After main
C.
Anywhere, but starting on a new line.
D.
None of the these.
Correct Answer:
C. Anywhere, but starting on a new line.
Q.
9
A pointer is a memory address. Suppose the pointer variable has p address 1000, and that p is declared to have type int*, and an int is 4 bytes long. What address is represented by expression p + 2 ?
A.
1002
B.
1004
C.
1006
D.
1008
Correct Answer:
D. 1008
Q.
10
Which one of the following is a loop construct that will always be executed once ?
A.
for
B.
while
C.
switch
D.
do while
Correct Answer:
D. do while
Q.
11
How many characters can a string hold when declared as follows ? char name[20]:
A.
18 char
B.
19 char
C.
20 char
D.
None of the these
Correct Answer:
C. 20 char
Q.
12
Directives are translated by the
A.
Pre-processor
B.
Compiler
C.
Linker
D.
Editor
Correct Answer:
A. Pre-processor
Q.
13
How many bytes does **int = D** use ?
A.
0 bytes
B.
1 bytes
C.
2 or 4 bytes
D.
10 bytes
Correct Answer:
C. 2 or 4 bytes
Q.
14
What is the maximum number of characters that can be held in the string variable char address line [40] ?
A.
38 characters
B.
39 characters
C.
40 characters
D.
41 characters
Correct Answer:
B. 39 characters
Q.
15
Which one is the correct description for the variable balance declared below ? int ** balance;
A.
Balance is a point to an integer
B.
Balance is a pointer to a pointer to an integer
C.
Balance is a pointer to a pointer to a pointer to an integer
D.
Balance is an array of integer
Correct Answer:
B. Balance is a pointer to a pointer to an integer
Q.
16
Which of the following statement is not true ?
A.
A pointer to an int and a pointer to a double are of the same size.
B.
A pointer must point to a data item on the heap (free store).
C.
A pointer can be reassigned to point to another data item.
D.
A pointer can point to an array.
Correct Answer:
B. A pointer must point to a data item on the heap (free store).
Q.
17
Let p1 be an integer pointer with a current value of 2000. What is the content of p1 after the expression p1++ has been evaluated ?
A.
2001 value
B.
2002 value
C.
2004 value
D.
2008 value
Correct Answer:
C. 2004 value
Q.
18
Let p1 and p2 be integer pointers. Which one is a syntactically wrong statement ?
A.
p1 = p1 + p2;
B.
p1 = p1 - 9;
C.
p2 = p2 + 9;
D.
printf(**%d**,p1 - p2);
Correct Answer:
A. p1 = p1 + p2;
Q.
19
Suppose that cPtr is a character pointer, and its current content is 300. What will be the new value in cPtr after the following assignment ? cPtr = cPtr + 5;
A.
value 305
B.
value 310
C.
value 320
D.
value 340
Correct Answer:
A. value 305
Q.
20
Which is valid expression in C language ?
A.
int my_num = 100,000;
B.
int my_num = 100000;
C.
int my num = 1000;
D.
int my num == 10000;
Correct Answer:
B. int my_num = 100000;
Q.
21
Who is the father of C language ?
A.
Steve Jobs
B.
James Gosling
C.
Dennis Ritchie
D.
Rasmus Lerdorf
Correct Answer:
C. Dennis Ritchie
Q.
22
All keywords in C are in ____________
A.
LowerCase letters
B.
UpperCase letters
C.
CamelCase letters
D.
None of the mentioned
Correct Answer:
A. LowerCase letters
Q.
23
Which of the following is true for variable names in C ?
A.
FThey can contain alphanumeric characters as well as special characters
B.
It is not an error to declare a variable to be one of the keywords(like goto, static)
C.
Variable names cannot start with a digit
D.
Variable can be of any length
Correct Answer:
C. Variable names cannot start with a digit
Q.
24
Which of the following cannot be a variable name in C ?
A.
volatile
B.
true
C.
friend
D.
export
Correct Answer:
A. volatile
Q.
25
Which of the following declaration is not supported by C language ?
A.
String str;
B.
char *str;
C.
float str = 3e2;
D.
Both String str; & float str = 3e2;
Correct Answer:
A. String str;
Q.
26
Which keyword is used to prevent any changes in the variable within a C program ?
A.
immutable
B.
mutable
C.
const
D.
volatile
Correct Answer:
C. const
Q.
27
What is the result of logical or relational expression in C ?
A.
True or False
B.
0 or 1
C.
0 if an expression is false and any positive number if an expression is true
D.
None of the mentioned
Correct Answer:
B. 0 or 1
Q.
28
Where in C the order of precedence of operators do not exist ?
A.
Within conditional statements, if, else
B.
Within while, do-while
C.
Within a macro definition
D.
None of the mentioned
Correct Answer:
D. None of the mentioned
Q.
29
What is an example of iteration in C ?
A.
for
B.
while
C.
do-while
D.
all of the mentioned
Correct Answer:
D. all of the mentioned
Q.
30
Functions can return enumeration constants in C ?
A.
true
B.
false
C.
depends on the compiler
D.
depends on the standard
Correct Answer:
A. true
Q.
31
Functions in C Language are always _________
A.
Internal
B.
External
C.
Both Internal and External
D.
External and Internal are not valid terms for functions
Correct Answer:
B. External
Q.
32
Which of following is not accepted in C ?
A.
static a = 10; //static as
B.
static int func (int); //parameter as static
C.
static static int a; //a static variable prefixed with static
D.
all of the mentioned
Correct Answer:
C. static static int a; //a static variable prefixed with static
Q.
33
Property which allows to produce different executable for different platforms in C is called ?
A.
File inclusion
B.
Selective inclusion
C.
Conditional compilation
D.
Recursive macros
Correct Answer:
C. Conditional compilation
Q.
34
What is #include ?
A.
Preprocessor directive
B.
Inclusion directive
C.
File inclusion directive
D.
None of the mentioned
Correct Answer:
A. Preprocessor directive
Q.
35
C preprocessors can have compiler specific features.
A.
True
B.
False
C.
Depends on the standard
D.
Depends on the platform
Correct Answer:
A. True
Q.
36
The C-preprocessors are specified with _________ symbol.
A.
#
B.
$
C.
""
D.
&
Correct Answer:
A. #
Q.
37
How many number of pointer (*) does C have against a pointer variable declaration ?
A.
7 pointer
B.
127 pointer
C.
255 pointer
D.
No limits
Correct Answer:
D. No limits
Q.
38
Which of the following is not possible statically in C language ?
A.
Jagged Array
B.
Rectangular Array
C.
Cuboidal Array
D.
Multidimensional Array
Correct Answer:
A. Jagged Array
Q.
39
which of the following return-type cannot be used for a function in C ?
A.
char *
B.
struct
C.
void
D.
none of the mentioned
Correct Answer:
D. none of the mentioned
Q.
40
When a C program is started, O.S environment is responsible for opening file and providing pointer for that file ?
A.
Standard input
B.
Standard output
C.
Standard error
D.
All of the mentioned
Correct Answer:
D. All of the mentioned
Q.
41
In C language, FILE is of which data type ?
A.
int
B.
char *
C.
struct
D.
none of the mentioned
Correct Answer:
C. struct
Q.
42
What is the sizeof(char) in a 32-bit C compiler ?
A.
1 bit
B.
2 bits
C.
1 Byte
D.
2 Bytes
Correct Answer:
C. 1 Byte
Q.
43
scanf() is a predefined function in______header file.
A.
stdlib. h
B.
ctype. h
C.
stdio. h
D.
stdarg. h
Correct Answer:
C. stdio. h
Q.
44
C Language develop at‌‌‌‌______?
A.
AT & T's Bell Laboratories of USA in 1972
B.
AT & T's Bell Laboratories of USA in 1970
C.
Sun Microsystems in 1973
D.
Cambridge University in 1972
Correct Answer:
A. AT & T's Bell Laboratories of USA in 1972
Q.
45
C programs are convert into machine language with help of
A.
An Editor
B.
A compiler
C.
An operating system
D.
None of these.
Correct Answer:
B. A compiler
Q.
46
C was primarily Developed as
A.
System programming language
B.
General purpose language
C.
Data processing language
D.
None of the above.
Correct Answer:
A. System programming language
Q.
47
Standard ANSI C recongnizes________number of keyboards ?
A.
30 keywords
B.
32 keywords
C.
36 keywords
D.
24 keywords
Correct Answer:
B. 32 keywords
Q.
48
C Language is a successor to which language ?
A.
FORTRAN
B.
D Language
C.
BASIC
D.
B Language
Correct Answer:
D. B Language
Q.
49
C is a which level language ?
A.
Low Level
B.
High Level
C.
Low + High
D.
None
Correct Answer:
B. High Level
Q.
50
Low level language is ?
A.
Human readable like language.
B.
language with big program size.
C.
language with small program size.
D.
Difficult to understand and readability is questionable.
Correct Answer:
D. Difficult to understand and readability is questionable.
Q.
51
High level language is a ?
A.
Human readable like language.
B.
language with small program size.
C.
language with big program size.
D.
language which is difficult to understand and not human readable.
Correct Answer:
A. Human readable like language.
Q.
52
C is _______ type of programming language ?
A.
Object Oriented
B.
Procedural
C.
Bit level language
D.
Functional
Correct Answer:
B. Procedural
Q.
53
Who invented C++ ?
A.
Dennis Ritchie
B.
Ken Thompson
C.
Brian Kernighan
D.
Bjarne Stroustrup
Correct Answer:
D. Bjarne Stroustrup
Q.
54
Which of the following is used for comments in C++ ?
A.
/* comment */
B.
// comment */
C.
// comment
D.
both // comment or /* comment */
Correct Answer:
D. both // comment or /* comment */
Q.
55
Which of the following is not a type of Constructor in C++ ?
A.
Default constructor
B.
Friend constructor
C.
Parameterized constructor
D.
Copy constructor
Correct Answer:
B. Friend constructor
Q.
56
Which of the following type is provided by C++ but not C ?
A.
double
B.
float
C.
bool
D.
int
Correct Answer:
C. bool
Q.
57
Which of the following correctly declares an array in C++ ?
A.
array{10};
B.
int array[10];
C.
array array[10];
D.
int array;
Correct Answer:
B. int array[10];
Q.
58
What is Inheritance in C++ ?
A.
Deriving new classes from existing classes
B.
Overloading of classes
C.
Classes with same names
D.
Wrapping of data into a single class
Correct Answer:
A. Deriving new classes from existing classes
Q.
59
What is meant by a polymorphism in C++ ?
A.
class having only single form
B.
class having many forms
C.
class having four forms
D.
class having two forms
Correct Answer:
B. class having many forms
Q.
60
What is abstract class in C++ ?
A.
Any Class in C++ is an abstract class
B.
Class from which any class is derived
C.
Class specifically used as a base class with atleast one pure virtual functions
D.
Class specifically used as a base class with atleast one virtual functions
Correct Answer:
C. Class specifically used as a base class with atleast one pure virtual functions
Q.
61
Which of the following constructors are provided by the C++ compiler if not defined in a class ?
A.
Copy constructor
B.
Assignment constructor
C.
Default constructor
D.
All of the mentioned
Correct Answer:
C. Default constructor
Q.
62
The operator used for dereferencing or indirection is ____
A.
*
B.
&
C.
->
D.
->>
Correct Answer:
A. *
Q.
63
What will happen in the following C++ code snippet ?1. int a = 100, b = 200;2. int *p = &a, *q = &b;3. p = q;
A.
b is assigned to a
B.
p now points to b
C.
a is assigned to b
D.
q now points to a
Correct Answer:
B. p now points to b
Q.
64
Which operator is used to signify the namespace ?
A.
conditional operator
B.
ternary operator
C.
scope-resolution operator
D.
bitwise operator
Correct Answer:
C. scope-resolution operator
Q.
65
What does a class in C++ holds ?
A.
data
B.
functions
C.
both data & functions
D.
arrays
Correct Answer:
C. both data & functions
Q.
66
Which other keywords are also used to declare the class?
A.
class
B.
union
C.
object
D.
struct
Correct Answer:
A. class
Q.
67
The data members and functions of a class in C++ are by default ____________
A.
protected
B.
private
C.
public
D.
public & protected
Correct Answer:
B. private
Q.
68
Constructors are used to ____________
A.
initialize the objects
B.
delete the objects
C.
construct the data members
D.
both initialize the objects & construct the data members
Correct Answer:
A. initialize the objects
Q.
69
Which of these following members are not accessed by using direct member access operator ?
A.
public
B.
private
C.
protected
D.
both private & protected
Correct Answer:
D. both private & protected
Q.
70
How many objects can present in a single class ?
A.
one
B.
two
C.
Three
D.
as many as possible
Correct Answer:
D. as many as possible
Q.
71
Which special character is used to mark the end of class ?
A.
;
B.
:
C.
#
D.
$
Correct Answer:
A. ;
Q.
72
Which of the following operators can't be overloaded ?
A.
::
B.
-
C.
+
D.
[]
Correct Answer:
A. ::
Q.
73
Which keyword is used to represent a friend function ?
A.
friend
B.
Friend
C.
friend_func
D.
Friend_func
Correct Answer:
A. friend
Q.
74
What is a friend function in C++ ?
A.
A function which can access all the private, protected and public members of a class
B.
A function which is not allowed to access any member of any class
C.
A function which is allowed to access public and protected members of a class
D.
A function which is allowed to access only public members of a class
Correct Answer:
A. A function which can access all the private, protected and public members of a class
Q.
75
What is a function template ?
A.
creating a function without having to specify the exact type
B.
creating a function with having an exact type
C.
creating a function without class
D.
creating a function without having blank spaces
Correct Answer:
A. creating a function without having to specify the exact type
Q.
76
What is the syntax of class template ?
A.
template <paramaters> class declaration
B.
Template <paramaters> class declaration
C.
temp <paramaters> class declaration
D.
Temp <paramaters> class declaration
Correct Answer:
A. template <paramaters> class declaration
Q.
77
What is meant by multiple inheritance ?
A.
Deriving a base class from derived class
B.
Deriving a derived class from base class
C.
Deriving a derived class from more than one base class
D.
Deriving a derived base class
Correct Answer:
C. Deriving a derived class from more than one base class
Q.
78
Which of the following is the correct syntax to print the message in C++ language ?
A.
cout <<"Hello world!";
B.
Cout << Hello world! ;
C.
Out <<"Hello world!;
D.
None of the above
Correct Answer:
A. cout <<"Hello world!";
Q.
79
Which of the following is the address operator ?
A.
@
B.
#
C.
&
D.
%
Correct Answer:
C. &
Q.
80
For inserting a new line in C++ program, which one of the following statements can be used ?
A.
\n
B.
\r
C.
\a
D.
None of the above
Correct Answer:
A. \n
Q.
81
Which of the following refers to characteristics of an array ?
A.
An array is a set of similar data items
B.
An array is a set of distinct data items
C.
An array can hold different types of datatypes
D.
None of the above
Correct Answer:
A. An array is a set of similar data items
Q.
82
If we stored five elements or data items in an array, what will be the index address or the index number of the array's last data item ?
A.
3 number
B.
4 number
C.
5 number
D.
88 number
Correct Answer:
B. 4 number
Q.
83
Wrapping data and its related functionality into a single entity is known as _____________
A.
Abstraction
B.
Encapsulation
C.
Polymorphism
D.
Modularity
Correct Answer:
B. Encapsulation
Q.
84
How many types of polymorphism are there in C++ ?
A.
1 types
B.
2 types
C.
3 types
D.
4 types
Correct Answer:
B. 2 types
Q.
85
Which of the following is not a type of inheritance ?
A.
Multiple
B.
Distributive
C.
Multilevel
D.
Hierarchical
Correct Answer:
B. Distributive
Q.
86
Which of the following is called insertion operator ?
A.
<<
B.
>>
C.
>
D.
<
Correct Answer:
A. <<
Q.
87
Which of the following is called extraction operator ?
A.
<<
B.
>>
C.
>
D.
<
Correct Answer:
B. >>
Q.
88
What is the size of a boolean variable in C++ ?
A.
1 bit
B.
1 byte
C.
4 bytes
D.
2 bytes
Correct Answer:
A. 1 bit
Q.
89
Which of the following is C++ equivalent for scanf() ?
A.
cin
B.
cout
C.
print
D.
input
Correct Answer:
A. cin
Q.
90
Which of the following is the scope resolution operator ?
A.
.
B.
*
C.
::
D.
~
Correct Answer:
C. ::
Q.
91
What is std in C++ ?
A.
std is a standard class in C++
B.
std is a standard namespace in C++
C.
std is a standard file reading header in C++
D.
std is a standard file reading header in C++
Correct Answer:
B. std is a standard namespace in C++
Q.
92
Which of the following accesses the seventh element stored in array ?
A.
array[6];
B.
array[7];
C.
array[7];
D.
array;
Correct Answer:
A. array[6];
Q.
93
What do vectors represent ?
A.
Static arrays
B.
Dynamic arrays
C.
Stack
D.
Queue
Correct Answer:
B. Dynamic arrays
Q.
94
Where does the execution of c++ program starts ?
A.
user-defined() function
B.
main() function
C.
void() function
D.
else() function
Correct Answer:
B. main() function
Q.
95
Which of the following correctly declares an array ?
A.
int array[10];
B.
int array;
C.
array{10};
D.
array array[10];
Correct Answer:
A. int array[10];
Q.
96
Which data type is used to represent the absence of parameters ?
A.
int
B.
void
C.
short
D.
float
Correct Answer:
B. void
Q.
97
The value 132.54 can be represented using which data type ?
A.
float
B.
void
C.
int
D.
bool
Correct Answer:
A. float
Q.
98
What is syntax of defining a constructor of class A ?
A.
a()
B.
~A()
C.
A()
D.
~A();
Correct Answer:
C. A()
Q.
99
There are ___ levels of heading in HTML
A.
Three
B.
Four
C.
Five
D.
Six
Correct Answer:
D. Six
Q.
100
The following html tag is used to display the content as a moving text
A.
<marquee>
B.
</img>
C.
<a href>
D.
none of the above
Correct Answer:
Q.
101
html comment should be enclosed between
A.
<!-- and -->
B.
<-- and -->
C.
<- and ->
D.
none of the above
Correct Answer:
A. <!-- and -->
Q.
102
_____ tag is used before beginning of the paragraph text
A.
<textarea>
B.
<sup>
C.
<p>
D.
<h1>
Correct Answer:
C. <p>
Q.
103
Example of picture editing software is
A.
ms paint
B.
photoshop
C.
animator pro
D.
none of the above
Correct Answer:
B. photoshop
Q.
104
html document have a extension ______
A.
.htx or .htxl
B.
.htm or .html
C.
.hmt or hmtl
D.
none of the above
Correct Answer:
B. .htm or .html
Q.
105
The _____ element can be used to identify your html file to the outside world
A.
title
B.
body
C.
head
D.
html
Correct Answer:
D. html
Q.
106
Which of the following is true
A.
In tables, header cells are centred by default and the data cells are right-aligned.
B.
In the case of character formatting the tag <TW> is used for typewriter-like text
C.
Unordered list starts with <UL> and ends with </UL>
D.
<SUPR> tag is used for superscripts text
Correct Answer:
C. Unordered list starts with <UL> and ends with </UL>
Q.
107
Which of the following is true?
A.
BR tag is used to have a blank line
B.
In tables, the header cell is centred by default and the data cells are right-aligned
C.
The <TR> is used to create a data cell
D.
INPUT tag must have at least 4 attributes
Correct Answer:
A. BR tag is used to have a blank line
Q.
108
to get the ordered list we use
A.
<HI>
B.
<UL>
C.
<OL>
D.
<ML>
Correct Answer:
C. <OL>
Q.
109
HTML is the method where ordinary text can be converted into
A.
ASCII Text
B.
EBCDIC Text
C.
IVDSL Text
D.
None of the above
Correct Answer:
D. None of the above
Q.
110
WWW stands for
A.
wide world web
B.
web world wide
C.
world wide web
D.
world web wide
Correct Answer:
C. world wide web
Q.
111
The CSS property used to control the element’s font-size is__________
A.
text-size
B.
text-size
C.
text-style
D.
None
Correct Answer:
D. None
Q.
112
The HTML attribute used to define the internal stylesheet is___________
A.
style
B.
<style>
C.
<link>
D.
<script>
Correct Answer:
B. <style>
Q.
113
Which of the following CSS property is used to set the background image of an element?
A.
background-color
B.
background-attachment
C.
background-image
D.
None
Correct Answer:
C. background-image
Q.
114
Which of the following is the correct syntax to display the hyperlinks without any underline?
A.
a {decoration : no-underline;}
B.
a {text-decoration : underline;}
C.
a {text-decoration : none;}
D.
None
Correct Answer:
C. a {text-decoration : none;}
Q.
115
Which of the following is the correct syntax to make the background-color of all paragraph elements to yellow?
A.
all {background-color : yellow;}
B.
p {background-color : #yellow;}
C.
p {background-color : yellow;}
D.
all p {background-color : #yellow;}
Correct Answer:
C. p {background-color : yellow;}
Q.
116
Which of the following property is used as the shorthand property for the padding properties?
A.
padding-right
B.
padding-left
C.
padding
D.
All of the above
Correct Answer:
C. padding
Q.
117
The CSS property used to make the text bold is___________
A.
weight :bold
B.
font-weight : bold
C.
style : bold
D.
font : bold
Correct Answer:
B. font-weight : bold
Q.
118
The property in CSS used to change the background color of an element is_____________
A.
background-color
B.
color
C.
bgcolor
D.
None
Correct Answer:
A. background-color
Q.
119
Which of the following is the correct syntax for referring the external style sheet?
A.
<style src = “example.css” >
B.
<style src = example.css>
C.
<stylesheet> example.css</stylesheet>
D.
<link rel=“stylesheet” type=“text/css” href=“example.css”>
Correct Answer:
D. <link rel=“stylesheet” type=“text/css” href=“example.css”>
Q.
120
The HTML attribute used to define the inline styles is___________
A.
class
B.
styles
C.
style
D.
None of the above
Correct Answer:
C. style
Q.
121
The CSS property used to draw a line around the elements outside the border?
A.
line
B.
border
C.
padding
D.
outline
Correct Answer:
D. outline
Q.
122
Which of the following CSS property is used to specify the space between every letter inside an element?
A.
character-spacing
B.
alpha-spacing
C.
letter-spacing
D.
alphabet-spacing
Correct Answer:
C. letter-spacing
Q.
123
The CSS property used to make the rounded borders, or rounded corners around an element is________
A.
border-radius
B.
border-collapse
C.
border-spacing
D.
None
Correct Answer:
A. border-radius
Q.
124
The CSS property used to specify the transparency of an element is____________
A.
visibility
B.
filter
C.
overlay
D.
opacity
Correct Answer:
D. opacity
Q.
125
Which of the following property is used as the shorthand property of margin properties?
A.
margin-right
B.
margin-left
C.
margin
D.
None of the above
Correct Answer:
C. margin
Q.
126
The CSS property used to set the distance between the borders of the adjacent cells in the table is__________
A.
border-collapse
B.
border-spacing
C.
border-radius
D.
None
Correct Answer:
B. border-spacing
Q.
127
Are the negative values allowed in padding property?
A.
No
B.
Yes
C.
Can’t say
D.
May be
Correct Answer:
A. No
Q.
128
What are the valid values of font-style property?
A.
italic, bold, bolder
B.
normal, bold, italic
C.
underline, bold, italic
D.
inherit, italic, normal, oblique
Correct Answer:
D. inherit, italic, normal, oblique
Q.
129
Which CSS property is used to specify uppercase and lowercase letters in a text?
A.
text-transform
B.
text-case
C.
case
D.
text-casing
Correct Answer:
A. text-transform
Q.
130
In how many ways can CSS be added to HTML?
A.
One
B.
Two
C.
Three
D.
Infinite
Correct Answer:
C. Three
Q.
131
Which selector do we use to specify the rule for binding some particular unique element?
A.
class
B.
tag
C.
both tag and class
D.
id
Correct Answer:
D. id
Q.
132
Internal styles are written within the _____ element.
A.
<style>…</style>
B.
<css>…</css>
C.
<stylesheet>…</stylesheet>
D.
Both A. and B.
Correct Answer:
A. <style>…</style>
Q.
133
HTML is what type of language ?
A.
Scripting Language
B.
Markup Language
C.
Programming Language
D.
Network Protocol
Correct Answer:
B. Markup Language
Q.
134
Which HTML tag produces the biggest heading?
A.
<h7>
B.
<h9>
C.
<h4>
D.
<h1>
Correct Answer:
D. <h1>
Q.
135
Which is correct?
A.
<b>Click Here<b>
B.
<strong>Click Here<strong>
C.
<b>Click Here</b>
D.
</strong>Click Here</strong>
Correct Answer:
C. <b>Click Here</b>
Q.
136
To create a link to an anchor, you use the______property in A tag.
A.
Name
B.
Tag
C.
Link
D.
Href
Correct Answer:
D. Href
Q.
137
The page title is inside the____tag.
A.
Body
B.
Head
C.
Division
D.
Table
Correct Answer:
B. Head
Q.
138
<UL>...</UL> tag is used to ________
A.
display the numbered list
B.
underline the text
C.
display the bulleted list
D.
bold the text
Correct Answer:
C. display the bulleted list
Q.
139
<TD>...</TD> tag is used to ________
A.
Table Heading
B.
Table Data
C.
Table row
D.
none of the above
Correct Answer:
Q.
140
Which tag is used to create body text in HTML?
A.
<HEAD>
B.
<TEXT>
C.
<TITLE>
D.
<BODY>
Correct Answer:
D. <BODY>
Q.
141
Which plugin is used to cycle through elements, like a slideshow?
A.
orbit
B.
slideshow
C.
scrollspy
D.
carousel
Correct Answer:
D. carousel
Q.
142
Which plugin is used to create a modal window?
A.
modal
B.
window
C.
dialog Box
D.
popup
Correct Answer:
A. modal
Q.
143
Which plugin is used to create a tooltip?
A.
popup
B.
tooltip
C.
modal
D.
dialog Box
Correct Answer:
B. tooltip
Q.
144
Bootstrap’s grid system allows up to
A.
6 columns across the page
B.
12 columns across the page
C.
columns across the page
D.
columns across the pag
Correct Answer:
B. 12 columns across the page
Q.
145
Which class should be used to indicate a button group?
A.
btn-group-buttons
B.
btn-group
C.
btn-grp
D.
btn-buttons
Correct Answer:
B. btn-group
Q.
146
Which of the following bootstrap styles of buttons can be used to make the size of the button small?
A.
.btn-lg
B.
.btn-sm
C.
.btn-xs
D.
.btn-block
Correct Answer:
B. .btn-sm
Q.
147
How many Container class are there in Bootstrap?
A.
one
B.
Two
C.
Three
D.
Four
Correct Answer:
B. Two
Q.
148
The _________ class is used to right-align navigation bar buttons.
A.
.navbar-default
B.
.navbar-btn
C.
.navbar-right
D.
.navbar-rgt
Correct Answer:
C. .navbar-right
Q.
149
Which class is used to add buttons inside the navigation bar?
A.
.navbar-default
B.
.navbar-btn
C.
.navbar-button
D.
.navbar-right
Correct Answer:
B. .navbar-btn
Q.
150
Bootstrap is developed by
A.
James Gosling
B.
Mark Jukervich
C.
Mark Otto and Jacob Thornton
D.
None of them
Correct Answer:
C. Mark Otto and Jacob Thornton
Q.
151
Which of the following bootstrap style is used to add standard links to .navbar?
A.
navbar-link
B.
link
C.
form-link
D.
None of the above.
Correct Answer:
A. navbar-link
Q.
152
How do you insert a comment in a CSS file?
A.
// this is a comment //
B.
/* this is a comment */
C.
' this is a comment
D.
//this is a comment
Correct Answer:
B. /* this is a comment */
Q.
153
How do you change the left margin of an element?
A.
margin:
B.
indent:
C.
margin-left:
D.
text-indent:
Correct Answer:
C. margin-left:
Q.
154
Interpret this statement: <strong>Michelle</strong>
A.
It makes Michelle strong
B.
It highlights Michelle as being strong
C.
It will print out Michelle in bold font
D.
It will print out Michelle in italic font
Correct Answer:
C. It will print out Michelle in bold font
Q.
155
What is the tag for an inline frame?
A.
Iframe
B.
Inframe
C.
frame
D.
inlineframe
Correct Answer:
A. Iframe
Q.
156
Which of the following class in bootstrap is used to create a big box for calling extra attention?
A.
.box
B.
.container
C.
.container-fluid
D.
.jumbotron
Correct Answer:
D. .jumbotron
Q.
157
Which of the following class in Bootstrap is used to create a basic list group?
A.
.grouped-list
B.
.select-list
C.
.list-group
D.
.list-grouped
Correct Answer:
C. .list-group
Q.
158
Which of the following class in Bootstrap is used to create basic pagination?
A.
.page
B.
.pagin
C.
.paginate
D.
.pagination
Correct Answer:
D. .pagination
Q.
159
Which of the following class in Bootstrap is used to create a badge?
A.
.tag
B.
.badge
C.
.page
D.
.flag
Correct Answer:
B. .badge
Q.
160
The class in Bootstrap which is used to specify the collapsible elements is -
A.
.collapse
B.
.carousel
C.
.pager
D.
None of the above
Correct Answer:
A. .collapse
Q.
161
Which of the following class in Bootstrap is used for creating the large size modals?
A.
.modal-large
B.
.modal-sm
C.
.modal-big
D.
.modal-lg
Correct Answer:
D. .modal-lg
Q.
162
Which of the following is correct method to add a success button?
A.
<button class = "btn btn-success"> success </button>
B.
<button class = "btn button-success">success </button>
C.
<button class = "button btn-success">success </button>
D.
<button class = "button btn-primary"> success </button>
Correct Answer:
A. <button class = "btn btn-success"> success </button>
Q.
163
Which of the following class in Bootstrap is used to create a label?
A.
.label
B.
.badge
C.
.flag
D.
.popover
Correct Answer:
A. .label
Q.
164
Which of the following is correct about the Bootstrap Grid system?
A.
The Bootstrap Grid system allows 12 columns across the page.
B.
Bootstrap Grid system is responsive.
C.
Both (a) and (b)
D.
Neither (a) nor (b)
Correct Answer:
C. Both (a) and (b)
Q.
165
Which of the following class in Bootstrap is used to style a table with borders surrounding every element?
A.
.table-striped
B.
.table-bordered
C.
.table-border
D.
.table-color
Correct Answer:
B. .table-bordered
Q.
166
Which of the following class in Bootstrap is used to style a table with a light gray background to rows when the user moves the cursor over them?
A.
.table-striped
B.
.table-bordered
C.
.table-border
D.
.table-hover
Correct Answer:
D. .table-hover
Q.
167
In the below code snippet, in what order will the margins be added ? p { margin: 25px 50px 75px 100px; }
A.
Top, Right, Bottom, Left,
B.
Top, Left, Bottom, Right,
C.
Top, Bottom, Right, Left,
D.
Right, Left, Top, Bottom,
Correct Answer:
A. Top, Right, Bottom, Left,
Q.
168
Which of the following class in Bootstrap is used to provide a responsive fixed width container ?
A.
.container-fixed
B.
.container-fluid
C.
.container
D.
All of the above
Correct Answer:
C. .container
Q.
169
How can we select an element with a specific ID in CSS ?
A.
#
B.
.
C.
^
D.
None of the above
Correct Answer:
A. #
Q.
170
What type of CSS is generally recommended for designing large web pages ?
A.
Inline
B.
Internal
C.
External
D.
None of the above
Correct Answer:
C. External
Q.
171
What type of CSS is the following code snippet ? <h1 style = "color:blue;" >A Blue Heading </h1>
A.
Inline
B.
Internal
C.
External
D.
None of the above
Correct Answer:
A. Inline
Q.
172
How many columns are allowed in a bootstrap grid system ?
A.
2 columns
B.
12 columns
C.
3 columns
D.
5 columns
Correct Answer:
B. 12 columns
Q.
173
Which HTML tag is used to declare internal CSS ?
A.
<style>
B.
None of the above
C.
<link>
D.
<script>
Correct Answer:
A. <style>
Q.
174
What are the attributes used to change the size of an image ?
A.
Width and height
B.
Big and Small
C.
Top and bottom
D.
None of the above
Correct Answer:
A. Width and height
Q.
175
We enclose HTML tags within ?
A.
< >
B.
{ }
C.
! !
D.
None of the above
Correct Answer:
A. < >
Q.
176
Which of the following tags doesn't require a closing tag ?
A.
<br>
B.
<hr>
C.
Both the <hr> and the <br> tag
D.
None of the above
Correct Answer:
C. Both the <hr> and the <br> tag
Q.
177
Which property is used to define the font of the element's text?
A.
font
B.
font-family
C.
font-style
D.
All of the above
Correct Answer:
B. font-family
Q.
178
Which is the correct inline CSS for p tag to define paragrap's text and background colors?
A.
<p css="color: red; background-color: yellow;">
B.
<p cssstyle="color: red; background-color: yellow;">
C.
<p inline="color: red; background-color: yellow;">
D.
<p style="color: red; background-color: yellow;">
Correct Answer:
D. <p style="color: red; background-color: yellow;">
Q.
179
What does the abbreviation HTML stand for?
A.
Hyper Text Markup Language.
B.
HighText Markup Language.
C.
Hyper Text Markdown Language.
D.
None of the above.
Correct Answer:
A. Hyper Text Markup Language.
Q.
180
What is the smallest header in HTML by default?
A.
h1
B.
h4
C.
h2
D.
h6
Correct Answer:
D. h6
Q.
181
What are the types of lists available in HTML?
A.
Ordered, Unordered Lists.
B.
Bulleted, Numbered Lists.
C.
Named, Unnamed Lists.
D.
None of the above.
Correct Answer:
A. Ordered, Unordered Lists.
Q.
182
HTML files are saved by default with the extension?
A.
.html
B.
.ht
C.
.h
D.
None of the above
Correct Answer:
A. .html
Q.
183
We enclose HTML tags within?
A.
{}
B.
<>
C.
!!
D.
None of the above
Correct Answer:
B. <>
Q.
184
What is the effect of the tag?
A.
It converts the text within it to bold font.
B.
It is used to write black-colored font.
C.
It is used to change the font size.
D.
None of the above.
Correct Answer:
A. It converts the text within it to bold font.
Q.
185
Which of the following is correct about HTML?
A.
HTML uses User Defined Tags.
B.
HTML uses tags defined within the language.
C.
Both A and B.
D.
None of the above.
Correct Answer:
B. HTML uses tags defined within the language.
Q.
186
How to display preformatted text in HTML?
A.
<p>
B.
<hr>
C.
<pre>
D.
All of the above
Correct Answer:
C. <pre>
Q.
187
What is meant by an empty tag in HTML?
A.
There is no such concept of an empty tag in HTML
B.
An empty tag does not require a closing tag
C.
An empty tag cannot have any content within it
D.
None of the above
Correct Answer:
B. An empty tag does not require a closing tag
Q.
188
Which attribute is used to provide a unique name to an HTML element?
A.
id
B.
type
C.
class
D.
None of the above
Correct Answer:
A. id
Q.
189
What is the function of the HTML style attribute?
A.
It is used to add styles to an HTML element.
B.
It is used to uniquely identify some specific styles of some element.
C.
Both A and B.
D.
None of the above.
Correct Answer:
A. It is used to add styles to an HTML element.
Q.
190
Which of the following is the correct syntax for using the HTML style attribute?
A.
<tagname style "property: value;" >
B.
<tagname style — "property;" >
C.
<tagname style >
D.
None of the above
Correct Answer:
A. <tagname style "property: value;" >
Q.
191
Which HTML element is used to define description data?
A.
<li>
B.
<dl>
C.
<ol>
D.
<dd>
Correct Answer:
D. <dd>
Q.
192
Which of the following properties is used to change the font of text?
A.
font-family
B.
font-size
C.
text-align
D.
None of the above
Correct Answer:
A. font-family
Q.
193
How are quotations defined in HTML?
A.
<quote>
B.
<block>
C.
<blockquote >
D.
None of the above
Correct Answer:
C. <blockquote >
Q.
194
What tag is used to render an image on a webpage?
A.
img
B.
src
C.
image
D.
None of the above
Correct Answer:
A. img
Q.
195
Apart from <i> tag, which of the following tag is used to render a text in italics?
A.
<strong>
B.
<em>
C.
<b>
D.
None of the above
Correct Answer:
B. <em>
Q.
196
Colors are defined in HTML using?
A.
RGB Values
B.
HEX Values
C.
RGBA values
D.
All of the above
Correct Answer:
D. All of the above
Q.
197
Which property is used to set colors in HTML?
A.
color
B.
background-color
C.
font-color
D.
text-color
Correct Answer:
A. color
Q.
198
What are the types of unordered lists in HTML?
A.
Circle, square, disc.
B.
Triangle, Square, disc.
C.
Triangle, Circle, Disc.
D.
All of the above.
Correct Answer:
A. Circle, square, disc.
Q.
199
Which property is used to set border colors in HTML?
A.
border-color
B.
border
C.
Both A and B
D.
None of the above
Correct Answer:
B. border
Q.
200
Which of the following things are necessary to create an HTML page?
A.
A text editor.
B.
Web Browser
C.
Both A and B
D.
None of the above
Correct Answer:
C. Both A and B
Q.
201
Which HTML tag is called the root element of an HTML document?
A.
<html>
B.
<title>
C.
<bodY>
D.
<head>
Correct Answer:
A. <html>
Q.
202
How is black color represented in terms of RGB values?
A.
RGB(O, O, 0)
B.
RGB(IOO, 100, 100)
C.
RGB(IOO, 100, 0)
D.
RGB(100, O, 0)
Correct Answer:
A. RGB(O, O, 0)
Q.
203
What does the Alpha value in RGBA represent?
A.
Opacity value for a color.
B.
The shade of a color.
C.
Both A and B.
D.
None of the above.
Correct Answer:
A. Opacity value for a color.
Q.
204
What does the Alpha value of 0.0 represent?
A.
Fully Opaque.
B.
Fully Transparent.
C.
50% transparent.
D.
None of the above.
Correct Answer:
B. Fully Transparent.
Q.
205
How to set a font for a whole page?
A.
<targetfont>
B.
<defaultfont>
C.
<font>
D.
None of the above
Correct Answer:
B. <defaultfont>
Q.
206
Which function is used to open a file in C?
A.
open()
B.
fopen()
C.
file_open()
D.
fileopen()
Correct Answer:
B. fopen()
Q.
207
Which is the correct syntax to declare a file pointer in C?
A.
File *file_pointer;
B.
FILE *file_pointer;
C.
File file_pointer;
D.
FILE file_pointer;
Correct Answer:
B. FILE *file_pointer;
Q.
208
Header files ___.
A.
Contain function declarations
B.
Can be included to a program
C.
End with .h extension
D.
All of these
Correct Answer:
D. All of these
Q.
209
The sqrt() function is used to calculate which value?
A.
Square
B.
Square of reverse bits
C.
Square root
D.
None of these
Correct Answer:
C. Square root
Q.
210
A recursive function in C ___.
A.
Call itself again and again
B.
Loop over a parameter
C.
Return multiple values
D.
None of these
Correct Answer:
A. Call itself again and again
Q.
211
Before using a pointer variable, it should be ___.
A.
Declared
B.
Initialized
C.
Both A. and B.
D.
None of the above
Correct Answer:
C. Both A. and B.
Q.
212
A ___ can be assigned the address of any data type.
A.
Dangling pointer
B.
Wild pointer
C.
Void pointer
D.
Null pointer
Correct Answer:
C. Void pointer
Q.
213
Before using a pointer variable, it should be ___.
A.
Declared
B.
Initialized
C.
Both A. and B.
D.
None of the above
Correct Answer:
C. Both A. and B.
Q.
214
Which of the following is the collection of different data types?
A.
structure
B.
string
C.
array
D.
All of the above
Correct Answer:
A. structure
Q.
215
The size of a union is ___.
A.
Sum of sizes of all members
B.
Predefined by the compiler
C.
Equal to size of largest data type
D.
None of these
Correct Answer:
C. Equal to size of largest data type
Q.
216
Which feature of OOPS described the reusability of code?
A.
Abstraction
B.
Encapsulation
C.
Polymorphism
D.
Inheritance
Correct Answer:
D. Inheritance
Q.
217
A single program of OOPS contains _______ classes?
A.
Only 1
B.
Only 999
C.
Only 100
D.
Any number
Correct Answer:
D. Any number
Q.
218
Which operator from the following can be used to illustrate the feature of polymorphism?
A.
Overloading <<
B.
Overloading &&
C.
Overloading | |
D.
Overloading +=
Correct Answer:
A. Overloading <<
Q.
219
Which header file is required by the C++ programming language to use the OOPS concept?
A.
stdio.h
B.
iostream.h
C.
stdlib.h
D.
We can easily use the OOPS concepts in c++ programs without using any header file
Correct Answer:
D. We can easily use the OOPS concepts in c++ programs without using any header file
Q.
220
Which function best describe the concept of polymorphism in programming languages?
A.
Class member function
B.
Virtual function
C.
Inline function
D.
Undefined function
Correct Answer:
B. Virtual function
Q.
221
Which of the following feature is also known as run-time binding or late binding?
A.
Dynamic typing
B.
Dynamic loading
C.
Dynamic binding
D.
Data hiding
Correct Answer:
C. Dynamic binding
Q.
222
Which HTML tag is used to set up a Javascript–like client?
A.
<script>
B.
<select>
C.
<anchor>
D.
None of the above
Correct Answer:
A. <script>
Q.
223
What are the main components of the front end of any working website?
A.
HTML, CSS, Javascript.
B.
HTML only.
C.
Javascript only.
D.
Node.js.
Correct Answer:
A. HTML, CSS, Javascript.
Q.
224
What is the select tag used for?
A.
Creates a combo box.
B.
Select some attributes and change their style.
C.
Change text font.
D.
None of the above.
Correct Answer:
A. Creates a combo box.
Q.
225
The most basic part of any HTML page is?
A.
ASCII Text
B.
Binary Text
C.
Text
D.
None of the above
Correct Answer:
A. ASCII Text
Q.
226
What are those objects called which are used for storing data on the client provided by the HTML local storage?
A.
Windows.IocaIStorage
B.
Window.sessionStorage
C.
Both A and B
D.
None of the above
Correct Answer:
C. Both A and B
Q.
227
The default value of the BORDER attribute is?
A.
1 pixel
B.
2pixel
C.
4pixel
D.
8pixel
Correct Answer:
A. 1 pixel
Q.
228
What are some valid character sets available?
A.
UTE-8
B.
ANSI
C.
ASCII
D.
All of the above
Correct Answer:
D. All of the above
Q.
229
How many characters can be written in I KB?
A.
1048
B.
1024
C.
1000
D.
None of the above
Correct Answer:
B. 1024
Q.
230
Which of the following are examples of block–level elements in HTML?
A.
<div>
B.
<p>
C.
<hl>
D.
All of the above
Correct Answer:
D. All of the above
Q.
231
What are the properties of block-level elements?
A.
It always starts on a new line.
B.
It always takes the full width available.
C.
It has a top and bottom margin.
D.
All of the above.
Correct Answer:
D. All of the above.
Q.
232
If a background image is smaller than the screen on which it is being displayed, what will occur on the webpage?
A.
The blank space will be shown in black.
B.
The image will be repeated
C.
The image will be stretched
D.
The image will not be displayed
Correct Answer:
B. The image will be repeated
Q.
233
Which property allows an image link to show a text label?
A.
alt
B.
str
C.
alternative
D.
None of the above
Correct Answer:
A. alt
Q.
234
What is CSS stands for in Webdesign?
A.
Cascading Style Sheets
B.
Cascade Style Sheet
C.
Color Style Sheets
D.
Color Style Sheet
Correct Answer:
A. Cascading Style Sheets
Q.
235
What CSS describes?
A.
CSS describes how calculation perform on button click.
B.
CSS describes how HTML elements are to be displayed on screen, paper, or in other media
C.
Both A. and B.
D.
None of the above
Correct Answer:
B. CSS describes how HTML elements are to be displayed on screen, paper, or in other media
Q.
236
What is a CSS selector?
A.
A CSS selector is the CSS class name
B.
A CSS selector is the set of properties that are going to be applied on HTML elements
C.
A CSS selector is name of CSS file.
D.
A CSS selector is the first part of a CSS Rule. It may an HTML element or pattern of elements.
Correct Answer:
D. A CSS selector is the first part of a CSS Rule. It may an HTML element or pattern of elements.
Q.
237
In a CSS file, there is a CSS rule for paragraphs tags — what does p can be called?
A.
Selector
B.
Attribute
C.
Property
D.
Tag
Correct Answer:
A. Selector
Q.
238
Internal styles are written within the element.
A.
<style>...</style>
B.
<css>...</css>
C.
<stylesheet>...</stylesheet>
D.
Both A. and B.
Correct Answer:
A. <style>...</style>
Q.
239
Inline styles are written within the attribute.
A.
style
B.
css
C.
stylesheet
D.
Both A. and B.
Correct Answer:
A. style
Q.
240
CSS comments are placed within the
A.
//
B.
/* and */
C.
<* and *>
D.
<! and !>
Correct Answer:
B. /* and */
Q.
241
Can comments also span multiple lines?
A.
Yes
B.
No
C.
Both A and B
D.
None of the above
Correct Answer:
A. Yes
Q.
242
Which property is used to define the text color?
A.
text-color
B.
color
C.
font-color
D.
Both A. and B.
Correct Answer:
B. color
Q.
243
Which property is used to define the background color?
A.
background
B.
bg-color
C.
background-color
D.
Both A. and C.
Correct Answer:
D. Both A. and C.
Q.
244
From the given options which is/are the valid way to represent a color?
A.
A valid color name like blue
B.
HEX code like #0000ff
C.
RGB Value rgb(0,0,255)
D.
All of the above
Correct Answer:
D. All of the above
Q.
245
Which property is used to define the font of the element is text?
A.
font
B.
font-family
C.
font-style
D.
All of the above
Correct Answer:
B. font-family
Q.
246
To make a text italic, which CSS property is used?
A.
font
B.
font-family
C.
font-style
D.
All of the above.
Correct Answer:
C. font-style
Q.
247
Why font-weight property is used?
A.
Sets how thick or thin characters in text should be displayed.
B.
Sets the size of the font
C.
Both A. and B.
D.
None of the above
Correct Answer:
A. Sets how thick or thin characters in text should be displayed.
Q.
248
What is/are the correct value(s) of font-weight property?
A.
bold, italic, underline
B.
normal, bold, italic
C.
normal, bold, bolder, lighter, initial, and inherit
D.
None of the above
Correct Answer:
C. normal, bold, bolder, lighter, initial, and inherit
Q.
249
What is the correct syntax of border property in CSS?
A.
border: border-width border-style border-color
B.
border: border-color border-width border-style
C.
border: border-style border-width border-color
D.
All of the above
Correct Answer:
A. border: border-width border-style border-color
Q.
250
Which of the following is the correct syntax to remove the underline on hyperlinks and visited hyperlinks?
A.
a {text-decoration : underline;}, a:visited {text-decoration : underline;}
B.
a {text-decoration : block;), a:visited {text-decoration : block;}
C.
a {text-decoration : none;}, a:visited {text-decoration : none;}
D.
None of the above
Correct Answer:
C. a {text-decoration : none;}, a:visited {text-decoration : none;}
Q.
251
Which CSS property is used to style the hyperlinks on hover (Mouse over)?
A.
a:mouseover
B.
a:move
C.
a:mover
D.
a:hover
Correct Answer:
D. a:hover
Q.
252
If you want to use a green dotted border around an image, which CSS property is used for that?
A.
border-style
B.
border-color
C.
border-decoration
D.
Both A. and B.
Correct Answer:
D. Both A. and B.
Q.
253
Which CSS property and value is used to center an element?
A.
text-align:center
B.
align:center
C.
text-align:middle
D.
align:middle
Correct Answer:
A. text-align:center
Q.
254
What are the valid values of text-align property?
A.
left, middle, right
B.
left, center, right
C.
left, center, right, justify
D.
left, middle, right, justify
Correct Answer:
C. left, center, right, justify
Q.
255
What is the use of "text-align:justify" in CSS?
A.
Stretches the lines so that each line has equal width
B.
Stretches the lines so that each line can be arranged in left alignment
C.
Stretches the lines so that each line can be arranged in right alignment
D.
None of the above
Correct Answer:
A. Stretches the lines so that each line has equal width
Q.
256
Which CSS property is used to specify the indentation of the first line of a text?
A.
text-align
B.
padding-left
C.
text-indent
D.
margin-left
Correct Answer:
C. text-indent
Q.
257
Which CSS property is used to specify the space between the characters in a text?
A.
text-space
B.
letter-space
C.
letter-spacing
D.
letter-distance
Correct Answer:
C. letter-spacing
Q.
258
Which CSS property is used to specify the space between lines?
A.
line-space
B.
line-spacing
C.
line-padding
D.
line-height
Correct Answer:
D. line-height
Q.
259
Which CSS property is used to specify the space between the words in a text?
A.
word-spacing
B.
word-padding
C.
word-height
D.
characters-spacing
Correct Answer:
A. word-spacing
Q.
260
Which CSS property adds shadow to text?
A.
content-shadow
B.
text-shadow
C.
word-shadow
D.
text-outline
Correct Answer:
B. text-shadow
Q.
261
Which is the correct CSS statement to capitalize the first letter of each word?
A.
text-transform: uppercase
B.
text-transform: capitalize
C.
text-transform: sentence
D.
Both A. and B.
Correct Answer:
B. text-transform: capitalize
Q.
262
What are the valid values of text-transform property?
A.
uppercase, lowercase, and capitalize
B.
uppercase, lowercase, capitalize, and sentence
C.
upper, lower, and capital
D.
upper, lower, capital, and sentence
Correct Answer:
A. uppercase, lowercase, and capitalize
Q.
263
What are the valid values of "text-decoration" property?
A.
overline, line-through, underline, and none
B.
overline, strike, line-through, underline, and none
C.
double-line, overline, line-through, underline, and none
D.
None of these
Correct Answer:
A. overline, line-through, underline, and none
Q.
264
Which CSS property specifies how to align the last line of a text?
A.
text-align
B.
last-text-align
C.
text-align-last-line
D.
text-align-last
Correct Answer:
D. text-align-last
Q.
265
Which CSS property sets the vertical alignment of an element?
A.
vertical-align
B.
vertical-text-align
C.
vertical-align-text
D.
text-valign
Correct Answer:
A. vertical-align
Q.
266
Which CSS property specifies the type of list item marker?
A.
list-style
B.
list-style-type
C.
list-style-square
D.
list-style-circle
Correct Answer:
B. list-style-type
Q.
267
Which is the correct CSS statement is used to remove the markers/bullets?
A.
list-style: none;
B.
list-style-type: 0;
C.
list-style-type: blank;
D.
list-style-type: none;
Correct Answer:
D. list-style-type: none;
Q.
268
Which CSS property specifies an image as the list item marker?
A.
list-style-image
B.
list-style-picture
C.
list-style-bgimage
D.
list-style-background
Correct Answer:
A. list-style-image
Q.
269
Which CSS property specifies if/how an element is displayed?
A.
block
B.
element-display
C.
display
D.
element-block
Correct Answer:
C. display
Q.
270
HTML elements are positioned by default.
A.
static
B.
fixed
C.
relative
D.
none
Correct Answer:
A. static
Q.
271
What are the valid values for "position" property?
A.
block, none, fixed, absolute, and static
B.
block, static, fixed, absolute, and sticky
C.
static, relative, fixed, absolute, and none
D.
static, relative, fixed, absolute, and sticky
Correct Answer:
D. static, relative, fixed, absolute, and sticky
Q.
272
Which CSS property specifies the opacity/transparency of an element?
A.
transparency
B.
opacity
C.
transform-opacity
D.
opacity-all
Correct Answer:
B. opacity
Q.
273
Which CSS function performs a calculation to be used as the property value?
A.
sum()
B.
add0
C.
calc()
D.
addition()
Correct Answer:
C. calc()
Q.
274
Which CSS function uses the largest value?
A.
large()
B.
maximum()
C.
max_value()
D.
max()
Correct Answer:
D. max()
Q.
275
Which CSS function uses the smallest value?
A.
small()
B.
minimum()
C.
min_value()
D.
min()
Correct Answer:
D. min()
Q.
276
What is CSS?
A.
CSS is a style sheet language
B.
CSS is designed to separate the presentation and content, including layout, colors, and fonts
C.
CSS is the language used to style the HTML documents
D.
All of the above
Correct Answer:
D. All of the above
Q.
277
The <style> in Internal CSS refers to
A.
Attributes
B.
HTML tags
C.
Selector
D.
All of the above
Correct Answer:
B. HTML tags
Q.
278
Can we link multiple stylesheets to a single page?
A.
Yes
B.
No
C.
Cannot say, it depends on CSS properties
D.
None of the above
Correct Answer:
A. Yes
Q.
279
The CSS property used to change text sizes?
A.
font-family
B.
font-size
C.
font
D.
Both A and C
Correct Answer:
B. font-size
Q.
280
In this line of code, identify the selector
p {border: 2px solid blue;}
A.
p
B.
border
C.
2px
D.
None of these
Correct Answer:
A. p
Q.
281
How many color names does CSS supports?
A.
140 names
B.
75 names
C.
100 names
D.
90 names
Correct Answer:
A. 140 names
Q.
282
The property is used in the positioning of the background image.
A.
background-image
B.
background-position
C.
padding
D.
All of the above.
Correct Answer:
B. background-position
Q.
283
what means 4 times the size of the current font.
A.
4px
B.
4 pt.
C.
4vw
D.
4em
Correct Answer:
D. 4em
Q.
284
Amongst the following browsers, which browser supports almost all the CSS properties?
A.
Firefox
B.
Safari
C.
Google Chrome
D.
Opera
Correct Answer:
C. Google Chrome
Q.
285
What is the CSS Entity for the character "#"?
A.
0023
B.
0026
C.
0027
D.
None of the above.
Correct Answer:
A. 0023
Q.
286
This selector selects all the
elements where the parent is a
element.
A.
h + p
B.
h > p
C.
p.h
D.
p > h
Correct Answer:
B. h > p
Q.
287
Which selector selects the markers of list items?
A.
::marker
B.
.marker
C.
::selector
D.
None of these
Correct Answer:
A. ::marker
Q.
288
Which is the most widely used font in customizing web pages?
A.
Times New Roman
B.
Georgia
C.
Arial
D.
Garamond
Correct Answer:
C. Arial
Q.
289
Which of the following CSS properties are animatable?
A.
color
B.
animation
C.
flex
D.
All of the above.
Correct Answer:
B. animation
Q.
290
We can give space between unit and value when assigning length values to CSS properties.
A.
True
B.
False
C.
Both A and B
D.
None of the above.
Correct Answer:
B. False
Q.
291
Which of these units of length is supported by Chrome Version 1.0?
A.
rem
B.
vw
C.
px
D.
vh
Correct Answer:
C. px
Q.
292
Which line of code is a must to write to apply CSS Flexbox properties?
A.
display: flex;
B.
display: flexbox;
C.
display: block;
D.
flex-direction: row;
Correct Answer:
A. display: flex;
Q.
293
The default value of justify-content property is
A.
flex-start
B.
flex-end
C.
space-between
D.
All of the above.
Correct Answer:
A. flex-start
Q.
294
Which is the correct syntax for adding animation?
A.
animation: name timing-function duration
B.
animation: name duration timing-function
C.
animation: name delay duration
D.
None of the above.
Correct Answer:
B. animation: name duration timing-function
Q.
295
Which line of code specifies playing an animation with the same speed from beginning to the end?
A.
div {animation- timing function: linear;)
B.
div {animation- timing function: ease in;}
C.
div {animation- play- state: paused;}
D.
div {animation- fill-mode: both;}
Correct Answer:
A. div {animation- timing function: linear;)
Q.
296
Which line of code represents a universal selector?
A.
*{border: 2px solid red;}
B.
both A&B
C.
body {border: 2px solid red;}
D.
None of these
Correct Answer:
A. *{border: 2px solid red;}
Q.
297
Which of the following properties specify the width of the borders?
A.
border-width
B.
border-style
C.
border
D.
Both A and C
Correct Answer:
D. Both A and C
Q.
298
Is border-image property animatable?
A.
Yes
B.
No
C.
Both A and B.
D.
None of these
Correct Answer:
B. No
Q.
299
Which cursor property value indicates that the program is busy?
A.
help
B.
default
C.
auto
D.
wait
Correct Answer:
D. wait
Q.
300
What does this line of code explain? p {display: flex;}
A.
All the elements are displayed as a block-level flex container
B.
All the elements are not displayed by the browser
C.
All the elements are displayed as a grid container
D.
All the elements are displayed as an inline flex container
Correct Answer:
D. All the elements are displayed as an inline flex container
Q.
301
The text-align property defines the alignment of text in an element.
A.
horizontal
B.
vertical
C.
both horizontal & vertical
D.
None of the above
Correct Answer:
A. horizontal
Q.
302
Does the z-index property accept negative values?
A.
Yes
B.
No
C.
Both A and B
D.
None of the above
Correct Answer:
A. Yes
Q.
303
Which CSS property is not supported by the Firefox browser?
A.
text-indent
B.
scroll- behavior
C.
overflow
D.
viewport
Correct Answer:
D. viewport
Q.
304
Which one is a fallback font?
A.
Georgia
B.
Times New Roman
C.
Serif
D.
None of the above.
Correct Answer:
C. Serif
Q.
305
Where do we store external stylesheets?
A.
CSS files
B.
HTML files
C.
Folder
D.
None of these
Correct Answer:
A. CSS files
Q.
306
In the given line of code, identify the type of selector used. #Main {background-color: yellow;}
A.
CSS element selector
B.
CSS id selector
C.
Combinator selector
D.
All of the above.
Correct Answer:
B. CSS id selector
Q.
307
The Hex Code for the white color is
A.
#FFFFFF
B.
#FOFOOO
C.
#FOOOOF
D.
None of the above.
Correct Answer:
A. #FFFFFF
Q.
308
In CSS, what does HSL stands for?
A.
hue, standard, light
B.
height, standard, line-width
C.
hue, saturation, lightness
D.
hue, standard, line-width
Correct Answer:
C. hue, saturation, lightness
Q.
309
Among the following CSS properties, which property is not a shorthand property?
A.
background
B.
padding
C.
display
D.
border
Correct Answer:
C. display
Q.
310
In this line of code, what is the use of the alt attribute?
A.
Adds a text description to an image
B.
Provides alternative information for an image
C.
To hide an image
D.
Both A. and B.
Correct Answer:
D. Both A. and B.
Q.
311
The CSS border property specifies the style, color, and of an element border.
A.
length
B.
width
C.
size
D.
area
Correct Answer:
B. width
Q.
312
What does "padding: 50px 20px;" specifies?
A.
top padding is 50px
B.
bottom padding is 50px
C.
right padding is 20px
D.
Both A. and B.
Correct Answer:
D. Both A. and B.
Q.
313
What is the default size for normal text, like paragraphs?
A.
11 px
B.
12 px
C.
18 px
D.
16 px
Correct Answer:
D. 16 px
Q.
314
Which of the following CSS selectors are used to specify a group of elements?
A.
tag
B.
id
C.
class
D.
both class and tag
Correct Answer:
C. class
Q.
315
Which of the following has introduced text, list, box, margin, border, color, and background properties?
A.
HTML
B.
PHP
C.
css
D.
Ajax
Correct Answer:
C. css
Q.
316
Which of the following CSS framework is used to create a responsive design?
A.
diango
B.
rails
C.
larawell
D.
bootstrap
Correct Answer:
D. bootstrap
Q.
317
Which of the following CSS property is used to make the text bold?
A.
text-decoration: bold
B.
font-weight: bold
C.
font-style: bold
D.
text-align: bold
Correct Answer:
B. font-weight: bold
Q.
318
What will be the output of following CSS code snippet?
hl {color: "greenn ; }
A.
nothings happen
B.
error occurs
C.
all h1 color is green
D.
heading becomes green
Correct Answer:
A. nothings happen
Q.
319
Which of the following CSS style property is used to specify an italic text?
A.
style
B.
font
C.
font-style
D.
@font-face
Correct Answer:
C. font-style
Q.
320
What will be the output of following CSS code snippet?
h1 {color: red text-decoration: underline; font-style: italic;}
A.
color: red, text-decoration: underline works
B.
only font-style: italic works
C.
color: red, text-decoration: underline and font-style: italic all works
D.
text-decoration: underline and font-style: italic works
Correct Answer:
B. only font-style: italic works
Q.
321
Which of the following are the CSS Extension Prefixes for Webkit?
A.
-chrome
B.
-web
C.
-o-
D.
-webkit
Correct Answer:
D. -webkit
Q.
322
Which of the following function defines a linear gradient as a CSS image?
A.
linear-gradient()
B.
gradient()
C.
grayscale()
D.
image()
Correct Answer:
A. linear-gradient()
Q.
323
Which of the following is the correct way to apply CSS Styles?
A.
in an external CSS file
B.
inside an HTML element
C.
inside the section of an HTML page
D.
All of the above.
Correct Answer:
D. All of the above.
Q.
324
Which of the following CSS property sets the font size of text?
A.
font-size
B.
text-size
C.
text
D.
size
Correct Answer:
A. font-size
Q.
325
Which of the following is not the property of the CSS box model?
A.
margin
B.
color
C.
width
D.
height
Correct Answer:
B. color
Q.
326
What will be the output of the following CSS code snippet?
span { border: 1px solid red; outline: green dotted thick; }
A.
All span elements will have a green thick border and a red outline
B.
All span elements will have a red border and a green dotted outline
C.
All span elements will have a outer green dotted border and an inner red border
D.
All span elements will have an outer red border and inner green dotted border
Correct Answer:
C. All span elements will have a outer green dotted border and an inner red border
Q.
327
Which of the following CSS property sets the shadow for a box element?
A.
Set-shadow
B.
box-shadow
C.
shadow
D.
canvas-shadow
Correct Answer:
B. box-shadow
Q.
328
Which of the following CSS property is used to set the color of the text?
A.
text-decoration
B.
pallet
C.
colour
D.
color
Correct Answer:
D. color
Q.
329
Which of the following CSS Property controls how an element is positioned?
A.
static
B.
position
C.
fix
D.
set
Correct Answer:
B. position
Q.
330
Which of the following CSS property is used to specify table borders in CSS?
A.
table:border
B.
table
C.
border
D.
none of the mentioned
Correct Answer:
C. border
Q.
331
Which CSS Property Sets A Background Image For An Element?
A.
Background - Color
B.
Background - Image
C.
Background - Attachment
D.
None of these
Correct Answer:
B. Background - Image
Q.
332
What Should Be The Table Width, so That The Width Of A Table Adjust To The Current Width Of The Browser Window?
A.
640 Pixels
B.
100%
C.
full-screen
D.
1024 PX
Correct Answer:
B. 100%
Q.
333
When We Write <img src="img.png"> What "img.png" Inside Double Quote Implies?
A.
Value
B.
Element
C.
Attribute
D.
Operator
Correct Answer:
A. Value
Q.
334
The Default Value Of "position" Attribute Is
A.
Fixed
B.
Absolute
C.
Inherit
D.
Static
Correct Answer:
D. Static
Q.
335
Who invented css?
A.
Hakon Wium Lie
B.
Tim Berners-Lee
C.
Rasmus Lerdorf
D.
None of above
Correct Answer:
A. Hakon Wium Lie
Q.
336
CSS is written in which language?
A.
PHP
B.
HTML
C.
JAVA
D.
python
Correct Answer:
B. HTML
Q.
337
What is the latest version of css?
A.
css 1
B.
css 2
C.
css 3
D.
css 4
Correct Answer:
C. css 3
Q.
338
how will you make all paragraph elements red in color?
A.
p {color: red;}
B.
p.all {color: red;}
C.
all.p {color: #998877;}
D.
p.all {color: #990000;}
Correct Answer:
A. p {color: red;}
Q.
339
HTML document start and end with which tag pairs?
A.
<HEAD > ... </HEAD >
B.
<BODY> ... </BODY>
C.
<HTML> ... </HTML>
D.
<WEB> ... </WEB>
Correct Answer:
C. <HTML> ... </HTML>
Q.
340
<TITLE> ... tag must be within _______
A.
Title
B.
Form
C.
Header
D.
Body
Correct Answer:
C. Header
Q.
341
Text within ... <STRONG> tag is displayed as _____
A.
bold
B.
italic
C.
list
D.
indented
Correct Answer:
A. bold
Q.
342
Which tag is used to display the numbered list?
A.
<OL > ... </OL >
B.
<LI > ... </LI >
C.
<DL> ... </DL >
D.
<EM > ... </EM >
Correct Answer:
A. <OL > ... </OL >
Q.
343
<SCRIPT> tag can be placed within____
A.
Header
B.
Body
C.
none of the above
D.
both A and B
Correct Answer:
D. both A and B
Q.
344
using <P>tag will
A.
start a new paragraph
B.
break the line
C.
end the current paragraph
D.
none of the above
Correct Answer:
A. start a new paragraph
Q.
345
<TD > tag is used for ________
A.
Table heading
B.
Table Records and table data
C.
Table row
D.
None of the above.
Correct Answer:
B. Table Records and table data
Q.
346
Which HTML Tag will use to scroll a text in web page?
A.
< marquee> ... </marquee >
B.
< scroll> ... </scroll>
C.
< round> ... </round>
D.
< go> ... </go>
Correct Answer:
A. < marquee> ... </marquee >
Q.
347
WWW stands for ______.
A.
World Wide Weapon
B.
World Wide Windows
C.
World Wide Web
D.
World Wide Writers
Correct Answer:
C. World Wide Web
Q.
348
A homepage is __________.
A.
an index of encyclopedia articles
B.
required for access to the Internet
C.
where all Internet data is stored
D.
the first page of a website
Correct Answer:
D. the first page of a website
Q.
349
____is a document commonly written in Hyper Text Markup Language (HTML) that is accessible through the Internet or other network using an internet browser.
A.
Word
B.
Web page
C.
Web site
D.
Windows
Correct Answer:
B. Web page
Q.
350
A web page is located using a _____.
A.
Universal Record Linking
B.
Uniform Resource Locator
C.
Universal Record Locator
D.
Uniformly Reachable Links
Correct Answer:
B. Uniform Resource Locator
Q.
351
A piece of icon or image on a web page associated with another webpage is called____________.
A.
url
B.
hyperlink
C.
plugin
D.
connection
Correct Answer:
B. hyperlink
Q.
352
________ is a collection of web pages.
A.
Browser
B.
Internet
C.
WWW
D.
Web site
Correct Answer:
D. Web site
Q.
353
What is the correct HTML tag for inserting a line break?
A.
< br>
B.
<pre >
C.
< hr>
D.
< td>
Correct Answer:
A. < br>
Q.
354
Webpage starts with which of the following tag?
A.
<html >
B.
<hltm >
C.
<htlm >
D.
None of these
Correct Answer:
A. <html >
Q.
355
JPG sometimes called ________.
A.
JPEG
B.
JPGG
C.
JPEE
D.
JJP
Correct Answer:
A. JPEG
Q.
356
A webpage displays a picture. What tag was used to display that picture?
A.
picture
B.
image
C.
img
D.
src
Correct Answer:
C. img
Q.
357
< b>tag makes the enclosed text bold. What is other tag to make text bold?
A.
<strong >
B.
<dar >
C.
< del>
D.
< black>
Correct Answer:
A. <strong >
Q.
358
Tags and text that are not directly displayed on the page are written in _ section.
A.
<head>
B.
<body>
C.
<html>
D.
<title>
Correct Answer:
A. <head>
Q.
359
Which tag inserts a line horizontally on your web page?
A.
<hr>
B.
<br>
C.
<b>
D.
<del>
Correct Answer:
A. <hr>
Q.
360
What should be the first tag in any HTML document?
A.
<html>
B.
<body>
C.
<head>
D.
<hmtl>
Correct Answer:
A. <html>
Q.
361
Which tag allows you to add a row in a table?
A.
<tr> and </tr>
B.
<thead> and </thead>
C.
<th> and </th>
D.
<td> and </td>
Correct Answer:
A. <tr> and </tr>
Q.
362
How can you make an e-mail link?
A.
<a href="xxx@yyy">
B.
<mail="xxx@yyy">
C.
<a href="mailto:xxx@yyy">
D.
<a hre="xxx@yyy">
Correct Answer:
C. <a href="mailto:xxx@yyy">
Q.
363
Choose the correct HTML tag to make a text italic
A.
<i>
B.
<ii>
C.
<u>
D.
<ol>
Correct Answer:
A. <i>
Q.
364
To create a combo box (drop down box) which tag will you use?
A.
<select>
B.
<list>
C.
<intput type="dropdown">
D.
None of the above.
Correct Answer:
A. <select>
Q.
365
Which of the following is not a pair tag?
A.
<p>
B.
<li>
C.
<h1>
D.
<img>
Correct Answer:
D. <img>
Q.
366
To create HTML document you require.
A.
web page editing software
B.
High powered computer
C.
Just a notepad can be used
D.
None of these
Correct Answer:
C. Just a notepad can be used
Q.
367
The special formatting codes in HTML document used to present content are
A.
tags
B.
attributes
C.
values
D.
None of above
Correct Answer:
A. tags
Q.
368
HTML documents are saved in
A.
Special binary format
B.
Machine language codes
C.
ASCII text
D.
None of above
Correct Answer:
C. ASCII text
Q.
369
Some tags enclose the text. Those tags are known as
A.
Couple tags
B.
Single tags
C.
Double tags
D.
Pair tags
Correct Answer:
D. Pair tags
Q.
370
In HTML document the tags
A.
Should be written in upper case
B.
should be written in propercase
C.
should be written in lower case
D.
can be written in both uppercase or lowercase
Correct Answer:
D. can be written in both uppercase or lowercase
Q.
371
Marquee is a tag in HTML to
A.
mark the list of items to maintaininqueue
B.
Mark the text so that it is hidden in browser
C.
Display text with scrolling effect
D.
None of the above.
Correct Answer:
C. Display text with scrolling effect
Q.
372
To create a blank line in your web page
A.
press Enter two times
B.
press Shift + Enter
C.
insert < BR > tag
D.
insert < Blank > tag
Correct Answer:
C. insert < BR > tag
Q.
373
The way the browser displays the object can be modified by _____
A.
attributes
B.
parameters
C.
modifiers
D.
None of these
Correct Answer:
A. attributes
Q.
374
Which of the following HTML code is valid?
A.
<font colour="red">
B.
<font color="red">
C.
<redɬ<font>
D.
None of the above.
Correct Answer:
D. None of the above.
Q.
375
Which of the following is an attribute related to font tag?
A.
fontsize
B.
fontface
C.
color
D.
All of the above
Correct Answer:
D. All of the above
Q.
376
HTML supports
A.
ordered lists
B.
unordered lists
C.
does not support those types
D.
both type of lists
Correct Answer:
D. both type of lists
Q.
377
What tag is used to list individual items of an ordered list?
A.
LI
B.
OL
C.
UL
D.
None of these
Correct Answer:
A. LI
Q.
378
Which attribute is used withimg tag to display the text if image could not load in browser?
A.
description
B.
name
C.
alt
D.
id
Correct Answer:
C. alt
Q.
379
Which attribute you’ll use with TD tag to merge two cells horizontally?
A.
merge=colspan2
B.
rowspan=2
C.
colspan=2
D.
merge=row2
Correct Answer:
C. colspan=2
Q.
380
Which of the following is correct about Bootstrap?
A.
Bootst rap is a sleek, intuitive, and powerful, mobile first front-end framework for faster and easier web development.
B.
Bootst rap was developed by Mark Otto and Jacob Thornton at Twitter
C.
- It uses HTML, CSS and Javascript.
D.
All of the above.
Correct Answer:
D. All of the above.
Q.
381
Which of the following is correct about Bootstrap?
A.
Bootstrap is responsive CSS adjusts to Desktops,Tablets and Mobiles.
B.
It contains beautiful and functional built-in components which are easy to customize.
C.
- Provides a clean and uniform solution for building an interface for developers.
D.
All of the above
Correct Answer:
D. All of the above
Q.
382
Which of the following is a part of Mobile First Strategy of Bootstrap?
A.
Content: Determine what is most important.
B.
Layout: Design to smaller widths first. Base CSS address mobile device first; media queries address for tablet, desktops.
C.
Progressive Enhancement: Add elements as screen size increases.
D.
All of the above.
Correct Answer:
D. All of the above.
Q.
383
Which of the following is correct about Bootstrap Grid System?
A.
Rows must be placed within a .container class for proper alignment and padding
B.
Use rows to create horizontal groups of columns.
C.
Content should be placed within the columns, and only columns may be the immediate children of rows.
D.
All of the above
Correct Answer:
Q.
384
Which of the following is correct about Bootstrap Grid System?
A.
Predefined grid classes like .row and .col-xs-4 are available for quickly making grid layouts. LESS mixins can also be used for more semantic layouts.
B.
Columns create gutters (gaps between column content) via padding. That padding is offset in rows for the first and the last column via negative margin on .rows.
C.
Grid columns are created by specifying the number of twelve av
D.
All of the above.
Correct Answer:
D. All of the above.
Q.
385
Which of the following is correct about Bootstrap Media Query?
A.
It simply applies some CSS, based on certain conditions set forth. If those conditions are met, the style is applied.
B.
Use rows to create horizontal groups of columns
C.
Both of the above.
D.
None of the above.
Correct Answer:
A. It simply applies some CSS, based on certain conditions set forth. If those conditions are met, the style is applied.
Q.
386
Which of the following is correct about Bootstrap Media Query?
A.
Media queries have two parts, a device specification and then a size rule.
B.
Media Queries in Bootst rap allow you to move, show and hide content based on the viewport size.
C.
Both of the above.
D.
None of these
Correct Answer:
C. Both of the above.
Q.
387
Which of the following is correct about Bootstrap Mobile First Strategy?
A.
You need to add the viewport meta tag to the element, to ensure proper rendering and touch zooming on mobile devices.
B.
width property cont rols the width of the device. Setting it to device-width will make sure that it is rendered across various devices (mobiles,desktops,tablets...) properly.
C.
initial-scale=1.0 ensures that when loaded, your web page will be rendered at a 1:1 scale, and no zooming will be applied out of the box.
D.
All of the above.
Correct Answer:
D. All of the above.
Q.
388
Which of the following class styles a table as a nice basic table with just some light padding and horizontal dividers?
A.
.table
B.
.table-st riped
C.
.table-bordered
D.
.table-hover
Correct Answer:
Q.
389
Which of the following class styles a table as a nice basic table with stripes on rows?
A.
.table
B.
.table-striped
C.
.table-hover
D.
None of the above.
Correct Answer:
B. .table-striped
Q.
390
Which of the following class styles a table with borders surrounding every element and rounded corners around the entire table?
A.
.table-striped
B.
.table
C.
.table-bordered
D.
None of these
Correct Answer:
C. .table-bordered
Q.
391
Which of the following class styles a table with a light gray background to rows while the cursor hovers over them?
A.
.table-bordered
B.
.table
C.
.table-hover
D.
None of the above.
Correct Answer:
C. .table-hover
Q.
392
Which of the following class applies the hover color to a particular row or cell of a table?
A.
.active
B.
.success
C.
.warning
D.
.danger
Correct Answer:
A. .active
Q.
393
Which of the following class indicates a successful or positive action?
A.
.active
B.
.danger
C.
.success
D.
.warning
Correct Answer:
C. .success
Q.
394
Which of the following class indicates a warning that might need attention?
A.
.success
B.
.active
C.
.danger
D.
.warning
Correct Answer:
D. .warning
Q.
395
Which of the following class indicates a dangerous or potentially negative action?
A.
.warning
B.
.success
C.
.active
D.
.danger
Correct Answer:
D. .danger
Q.
396
Which of the following class can be used to create a responsive table?
A.
.table-responsive
B.
.table
C.
.table-move
D.
.table-danger
Correct Answer:
A. .table-responsive
Q.
397
Which of the following class is required to be added to form tag to make it inline?
A.
.inline
B.
.form-inline
C.
.horizontal
D.
None of the above.
Correct Answer:
B. .form-inline
Q.
398
Which of the following class is required to be added to form tag to make it horizontal?
A.
.horizontal
B.
.form-horizontal
C.
.horizontally
D.
None of these
Correct Answer:
B. .form-horizontal
Q.
399
Which of the following bootstrap style of button creates a default/ standard button?
A.
.btn
B.
.btn-success
C.
.btn-primary
D.
.btn-info
Correct Answer:
A. .btn
Q.
400
Which of the following bootstrap style of button provides extra visual weight and identifies the primary action in a set of buttons?
A.
.btn
B.
.btn-info
C.
.btn-success
D.
.btn-primary
Correct Answer:
D. .btn-primary
Q.
401
Which class adds zebra-stripes to a table?
A.
.table-zebra
B.
.table-bordered
C.
.even and .odd
D.
.table-striped
Correct Answer:
D. .table-striped
Q.
402
Which class shapes an image to a circle?
A.
.img-circle
B.
.img-round
C.
.rounded-circle
D.
.img-rounded
Correct Answer:
C. .rounded-circle
Q.
403
Which class is used to create a big box for calling extra attention?
A.
.bigbox
B.
.jumbotron
C.
.jumbo
D.
.container
Correct Answer:
B. .jumbotron
Q.
404
Which button class is used to create a large button?
A.
.btn-lg
B.
.btn-xl
C.
.btn
D.
.btn-large
Correct Answer:
A. .btn-lg
Q.
405
Which class is used to create a button group?
A.
.btn-group
B.
.button-group
C.
.group-btn
D.
.group-button
Correct Answer:
A. .btn-group
Q.
406
Which class is used to create a badge?
A.
.badge-item
B.
.badge-label
C.
.label-badge
D.
.badge
Correct Answer:
D. .badge
Q.
407
Which class is used to create a loader?
A.
.spinner-loader
B.
.loader
C.
.spinner-border
D.
.spinner
Correct Answer:
C. .spinner-border
Q.
408
Which class is used to create a basic pagination?
A.
.navigation
B.
.pages
C.
.pagination
D.
.page
Correct Answer:
C. .pagination
Q.
409
Which class is used to create a basic list group?
A.
.group-list
B.
.list-group
C.
.grouped-list
D.
.grouped
Correct Answer:
B. .list-group
Q.
410
Which class adds a heading to a card?
A.
.card-heading
B.
.card-head
C.
.card-footer
D.
.card-header
Correct Answer:
D. .card-header
Q.
411
Which class indicates a dropdown menu?
A.
.dropdown-list
B.
.dropdown
C.
.select
D.
None of these
Correct Answer:
B. .dropdown
Q.
412
A standard navigation bar is created with:
A.
<nav class: "navbar navbar-default">
B.
< nav class: "navigationbar navbar-default">
C.
<nav navbar">
D.
< nav class= "navbar navbar-expand-md " >
Correct Answer:
D. < nav class= "navbar navbar-expand-md " >
Q.
413
Which component is used to cycle through elements, like a slideshow?
A.
Scrollspy
B.
Orbit
C.
Carousel
D.
Slideshow
Correct Answer:
C. Carousel
Q.
414
Which attribute is used to create a tooltip?
A.
data-toggle="popup"
B.
data-toggle="modal"
C.
data-toggle: "collapse"
D.
data-toggle="tooltip"
Correct Answer:
D. data-toggle="tooltip"
Q.
415
Which contextual class indicates a succesful or positive action?
A.
.bg-info
B.
.bg-success
C.
.bg-primary
D.
.bg-warning
Correct Answer:
B. .bg-success
Q.
416
Which contextual class indicates a dangerous or potentially negative action?
A.
.bg-primary
B.
.bg-danger
C.
.bg-info
D.
.bg-warning
Correct Answer:
B. .bg-danger
Q.
417
The Bootstrap grid system has four classes which defines screen size:
A.
s, sm, mid, lg
B.
xs, sm, md, lg
C.
xs, sml, mid, lg
D.
x, sm, md, lg
Correct Answer:
B. xs, sm, md, lg
Q.
418
Which class is use to display black navigation bar?
A.
.nav-pills
B.
.navbar-inverse
C.
.nav-stacked
D.
None of the above
Correct Answer:
B. .navbar-inverse
Q.
419
Which class is used to add rounded corners to an image?
A.
.img-circle
B.
.rounded
C.
Both of the above
D.
None of the above.
Correct Answer:
B. .rounded
Q.
420
Which of the following is true about Jumbotron?
A.
A jumbotron is displayed as a grey box with rounded corners.
B.
Jumbotron can increase the size of headings and add a lot of margin for landing page content.
C.
Both of the above
D.
None of these
Correct Answer:
C. Both of the above
Q.
421
The bootstrap class md means for
A.
phones
B.
tablets
C.
small laptops
D.
laptops and desktops
Correct Answer:
C. small laptops
Q.
422
Which class is used to create warning notification alerts in Bootstrap?
A.
.alert-danger
B.
.alert-warning
C.
.alert-info
D.
.alert-success
Correct Answer:
B. .alert-warning
Q.
423
Which class is used to create a button as a link in bootstrap?
A.
.btn-hyperlink
B.
.btn-link
C.
.btn-url
D.
.btn-anchor
Correct Answer:
B. .btn-link
Q.
424
Which of the following class is used to create thumbnail image?
A.
.img-tmbnail
B.
.img-thumb
C.
.img-thumbnail-image
D.
.img-thumbnail
Correct Answer:
D. .img-thumbnail
Q.
425
.img-circle class makes the entire image round by adding border-radius:_________.
A.
50%
B.
100%
C.
45%
D.
None of the above.
Correct Answer:
A. 50%
Q.
426
The contextual classes that are used to create colored progress bar:
A.
.progress-bar-success
B.
.progress-bar-info
C.
.progress-bar-warning
D.
All of the above
Correct Answer:
D. All of the above
Q.
427
The .container class provides
A.
Full width container
B.
Fixed width container
C.
Table format
D.
To create a Form
Correct Answer:
B. Fixed width container
Q.
428
Which class creates pagination?
A.
pagination
B.
pager
C.
pagination-link
D.
link-pagination
Correct Answer:
A. pagination
Q.
429
Default size of H3 bootstrap heading
A.
18px
B.
30px
C.
26px
D.
24px
Correct Answer:
D. 24px
Q.
430
Which class creates list of items?
A.
lst-group
B.
list-group
C.
menu-group
D.
list-grp
Correct Answer:
B. list-group
Q.
431
Default size of H2 bootstrap heading
A.
20px
B.
24px
C.
30px
D.
36px
Correct Answer:
C. 30px
Q.
432
Which is default for a form
A.
Horizontal Form
B.
Vertical Form
C.
Inline Form
D.
None of these
Correct Answer:
B. Vertical Form
Q.
433
Default size of H1 bootstrap heading
A.
20px
B.
24px
C.
30px
D.
36px
Correct Answer:
D. 36px
Q.
434
Default size of H6 bootstrap heading
A.
10px
B.
12px
C.
14px
D.
16px
Correct Answer:
B. 12px
Q.
435
The bootstrap class xs means for
A.
phones
B.
tablets
C.
desktop
D.
larger desktops
Correct Answer:
A. phones
Q.
436
Bootstrap’s global default font-size is
A.
10px
B.
12px
C.
13px
D.
14px
Correct Answer:
D. 14px
Q.
437
The Carousel plugin is a component
A.
For getting lot of icons
B.
For animation
C.
For cycling through elements like slideshow
D.
None of the above.
Correct Answer:
C. For cycling through elements like slideshow
Q.
438
In Bootstrap we can addfor
A.
Proper Rendering and Zooming in mobile
B.
Make SEO
C.
Make proper view of labels
D.
None
Correct Answer:
A. Proper Rendering and Zooming in mobile
Q.
439
What is latest version of bootstrap?
A.
version 2
B.
version 4
C.
version 3
D.
version 5
Correct Answer:
D. version 5
Q.
440
Bootstrap is used for
A.
Data
B.
IoT
C.
Bigdata
D.
Web applications
Correct Answer:
D. Web applications
Q.
441
Which class is used to create a badge danger?
A.
.badge-success
B.
.badge-warning
C.
.badge-dark
D.
.badge-danger
Correct Answer:
D. .badge-danger
Q.
442
Which class is used to create a pagination?
A.
.pagination
B.
.page-item
C.
.page
D.
None of these
Correct Answer:
A. .pagination
Q.
443
We use the ___ class to make any element fixed/stay at the top of the page when you scroll past it.
A.
.stay-top
B.
.fix-top
C.
.sticky-top
D.
.scroll-top
Correct Answer:
C. .sticky-top
Q.
444
The ___ class adds a scrollbar to the table when needed
A.
.table-scroll
B.
.table-navigate
C.
.table-custom
D.
.table-responsive
Correct Answer:
D. .table-responsive
Q.
445
In list groups, which class is used to highlight the current item?
A.
.active
B.
.current
C.
.ongoing
D.
.recent
Correct Answer:
A. .active
Q.
446
Which class to create border in bootstrap?
A.
.boder
B.
.border
C.
.boarder
D.
None of the above.
Correct Answer:
B. .border
Q.
447
In Bootstrap, content must be placed within...
A.
Columns
B.
row
C.
table
D.
None of these
Correct Answer:
A. Columns
Q.
448
If you want to have 3 equal columns in Bootstrap, which class would you use?
A.
.col-md-4
B.
.col-md-6
C.
.col-md-1
D.
.col-md-3
Correct Answer:
A. .col-md-4
Q.
449
Is it true that the Bootstrap grid system works across multiple devices?
A.
yes
B.
no
C.
some device
D.
None of these
Correct Answer:
A. yes
Q.
450
Which of the following is correct method to add a success button.
A.
.btn and .btn-success
B.
.btn
C.
.btn and .btn-warning
D.
.btn and .btn-suces
Correct Answer:
A. .btn and .btn-success
Q.
451
Which of the following class in Bootstrap is used to create an striped progress bar?
A.
.progress-bar-striped
B.
.progress-striped
C.
.progress-bar-strip
D.
None of the above
Correct Answer:
A. .progress-bar-striped
Q.
452
Which of the following class in Bootstrap is used for creating the small size modals?
A.
.modal-sm
B.
.modal-md
C.
.modal-lg
D.
None of the above
Correct Answer:
A. .modal-sm
Q.
453
How do you add shadow to elements in CSS3?
A.
box-shadow: 10px 10px 5px grey;
B.
shadow-right: 10px shadow-bottom: 10px;
C.
shadow-color: grey;
D.
alpha-effect[shadow]: 10px 10px 5px grey;
Correct Answer:
A. box-shadow: 10px 10px 5px grey;
Q.
454
How can you created rounded corners using CSS3?
A.
border[round]: 30px;
B.
corner-effect: round;
C.
border-radius: 30px;
D.
alpha-effect: round-corner;
Correct Answer:
C. border-radius: 30px;
Q.
455
How to rotate objects using CSS3?
A.
object-rotation: 30deg;
B.
transform: rotate(30deg);
C.
rotate-object: 30deg;
D.
transform: rotate-30deg-clockwise;
Correct Answer:
C. rotate-object: 30deg;
Q.
456
How to re-size/scale objects using CSS3?
A.
transform: scale(1.5);
B.
scale-object: 2,4;
C.
scale: (2,4);
D.
None
Correct Answer:
A. transform: scale(1.5);
Q.
457
__________ is a property that allows developers to add rounded corners on the design elements.
A.
Corner
B.
Box Shadow
C.
Round Corner
D.
Border-Radius
Correct Answer:
D. Border-Radius
Q.
458
Which of the following is correct method to add a warning button.
A.
.btn and .btn-success
B.
.btn-btnwarning
C.
.btn and .btn-warning
D.
None of these
Correct Answer:
C. .btn and .btn-warning
Q.
459
Which of the following class in Bootstrap is used to create an progress bar?
A.
.progress-bar-striped
B.
.progress-bar
C.
.progress-bar-success
D.
None of these
Correct Answer:
B. .progress-bar
Q.
460
If you want to have 4 equal columns in Bootstrap, which class would you use?
A.
.col-md-4
B.
.col-md-6
C.
.col-md-5
D.
.col-md-3
Correct Answer:
D. .col-md-3
Q.
461
If you want to have 2 equal columns in Bootstrap, which class would you use?
A.
.col-md-3
B.
.col-md-6
C.
.col-md-4
D.
.col-md-12
Correct Answer:
B. .col-md-6
Q.
462
If you want to have 6 equal columns in Bootstrap, which class would you use?
A.
.col-md-2
B.
.col-md-4
C.
.col-md-3
D.
.col-md-6
Correct Answer:
A. .col-md-2
Q.
463
Which class is use to fading effect to alert in bootstrap?
A.
.fade
B.
.show
C.
.progress
D.
Both A. and B.
Correct Answer:
D. Both A. and B.
Q.
464
Which class is use to add slider caption in bootstrap?
A.
.carousel-caption
B.
.carousel
C.
.carousel-link
D.
None of these
Correct Answer:
A. .carousel-caption
Q.
465
Where in an HTML document is the correct place to refer to an internal style sheet?
A.
In the <head> section
B.
At the end of the document
C.
In the <body> section
D.
None of these
Correct Answer:
A. In the <head> section
Q.
466
Which HTML attribute is used to define inline styles?
A.
class
B.
style
C.
styles
D.
font
Correct Answer:
B. style
Q.
467
Which is the correct CSS syntax?
A.
body:color=black;
B.
{body;color:black;}
C.
{body:color=black;}
D.
body {color: black;}
Correct Answer:
D. body {color: black;}
Q.
468
How do you add a background color for all
elements?
A.
hl .all {background-color:#FFFFFF;}
B.
hl {background-color:#FFFFFF;}
C.
all.hl {background-color:#FFFFFF;}
D.
None of these
Correct Answer:
B. hl {background-color:#FFFFFF;}
Q.
469
Which CSS property is used to change the text color of an element?
A.
text-color
B.
fgcolor
C.
color
D.
None of these
Correct Answer:
C. color
Q.
470
Which CSS property controls the text size?
A.
font-size
B.
font-style
C.
text-style
D.
text-size
Correct Answer:
A. font-size
Q.
471
How do you display hyperlinks without an underline?
A.
a {decoration:no-underline;}
B.
a {text-decoration:none;}
C.
a {underline:none;}
D.
a {text-decoration:no-underline;}
Correct Answer:
B. a {text-decoration:none;}
Q.
472
How do you display a margin like this:
The margin-top = 10 pixels The margin-bottom = 5 pixels The margin-left = 20 pixels The margin-right = 1pixel?
A.
margin: 10px 5px 20px 1px;
B.
margin: 10px 20px 5px 1px;
C.
margin: 10px 1px 5px 20px;
D.
margin: 1px 5px 20px 10px;
Correct Answer:
C. margin: 10px 1px 5px 20px;
Q.
473
Which property is used to change the left margin of an element?
A.
padding-left
B.
margin-left
C.
indent
D.
left
Correct Answer:
B. margin-left
Q.
474
When using the padding property; are you allowed to use negative values?
A.
Yes
B.
No
C.
both yes or no
D.
None of these
Correct Answer:
B. No
Q.
475
How do you make a list type none?
A.
list-style-type: none;
B.
list-style-type: square;
C.
ist-type: none;
D.
None of these
Correct Answer:
A. list-style-type: none;
Q.
476
How do you select an element with id demo?
A.
.demo
B.
#demo
C.
demo
D.
None of these
Correct Answer:
B. #demo
Q.
477
How do you select elements with class name test?
A.
#test
B.
classtest
C.
test
D.
.test
Correct Answer:
D. .test
Q.
478
What is the default value of the position property?
A.
absolute
B.
static
C.
fixed
D.
relative
Correct Answer:
B. static
Q.
479
Which of the following property specifies the right margin of an element?
A.
margin-right
B.
margin-left
C.
right-margin
D.
None of these
Correct Answer:
A. margin-right
Q.
480
How do you display the following padding:
The top padding = 10 pixels The bottom padding = 5 pixels The left padding = 20 pixels The right padding = 1pixel
A.
padding: 10px 5px 20px 1px;
B.
padding: 10px 20px 5px 1px;
C.
padding: 5px 20px 10px 1px;
D.
padding: 10px 1px 5px 20px;
Correct Answer:
D. padding: 10px 1px 5px 20px;
Q.
481
What property and value do we use if we want to align text to the right?
A.
text-align: right;
B.
text-align: center;
C.
text-align: left;
D.
None of these
Correct Answer:
A. text-align: right;
Q.
482
What property and value do we use if we want to align text to the justify?
A.
text-align: right;
B.
text-align: left;
C.
text-align:center;
D.
text-align: justify;
Correct Answer:
D. text-align: justify;
Q.
483
Which class adds a text white to a page?
A.
.text-white
B.
text-light
C.
Both A and B
D.
None of these
Correct Answer:
C. Both A and B
Q.
484
Which class helps a proper dark background in bootstrap?
A.
.bg-dark
B.
.bg-danger
C.
.bg-info
D.
.bg-warning
Correct Answer:
A. .bg-dark
Q.
485
which class make a spinner in bootstrap?
A.
.spinner-loader
B.
.spinner-boader
C.
.spinner-border
D.
None of these
Correct Answer:
C. .spinner-border
Q.
486
What does "padding: 50px 0px 20px 0px" specifies?
A.
only top and bottom
B.
only top
C.
top and right
D.
All of the above
Correct Answer:
A. only top and bottom
Q.
487
Which of the following CSS selectors are used to specify tag elements?
A.
.p
B.
p
C.
#p
D.
None of these
Correct Answer:
B. p
Q.
488
Which of the following is the property of the CSS box model?
A.
background-color
B.
color
C.
line-height
D.
height-width
Correct Answer:
D. height-width
Q.
489
Which of the following attribute specifies the URL of the linked resource?
A.
src
B.
link
C.
rel
D.
href
Correct Answer:
D. href
Q.
490
Which of the following property adds padding to the top of an element?
A.
height
B.
padding-height
C.
padding-top
D.
top
Correct Answer:
C. padding-top
Q.
491
Which of the following property sets a consistent margin on all four sides of the affected element?
A.
border
B.
margin
C.
padding
D.
None of these
Correct Answer:
B. margin
Q.
492
Which of the following property sets the background image to scroll or not to scroll with its associated element’s content?
A.
background-scroll
B.
background-attach
C.
background-attachment
D.
background-allowance
Correct Answer:
C. background-attachment
Q.
493
HTML FULL FORM?
A.
HYPER TEXT MARKUP LANGUAGE
B.
HYPER MARKUP LANGUAGE
C.
HYPER TEXT MARKUP LANG
D.
HYPER TEXT MARKUP
Correct Answer:
A. HYPER TEXT MARKUP LANGUAGE
Q.
494
How do you create a new Express application?
A.
express()
B.
express.create()
C.
express.app()
D.
express.new()
Correct Answer:
A. express()
Q.
495
What is the role of RESTful APIs in backend development?
A.
To create dynamic user interfaces
B.
To handle client-server communication
C.
To manage server hosting
D.
To write database queries
Correct Answer:
B. To handle client-server communication
Q.
496
Which of the following is used to declare a block-scoped variable in ES6?
A.
var
B.
let
C.
const
D.
All of the above
Correct Answer:
B. let
Q.
497
What is a primary responsibility of a backend Node.js developer?
A.
Designing the user interface
B.
Managing server-side logic
C.
Writing CSS
D.
Creating animations
Correct Answer:
B. Managing server-side logic
Q.
498
Which of the following commands is used to install Express.js?
A.
npm install express
B.
npm install -g express
C.
npm get express
D.
npm fetch express
Correct Answer:
A. npm install express
Q.
499
Which of the following is important for a backend Node.js developer to understand?
A.
Database management
B.
Frontend frameworks
C.
CSS preprocessors
D.
Design patterns
Correct Answer:
A. Database management
Q.
500
Which of the following is true about arrow functions in ES6?
A.
They do not have their own this context.
B.
They can be used as constructors.
C.
They are not suitable for methods in objects.
D.
Both a and c
Correct Answer:
D. Both a and c
Q.
501
Which of the following is used to define a route in Express?
A.
app.get()
B.
app.post()
C.
app.put()
D.
All of the above
Correct Answer:
D. All of the above
Q.
502
Which tool is used for version control in Node.js development?
A.
Git
B.
Docker
C.
Jenkins
D.
Kubernetes
Correct Answer:
A. Git
Q.
503
What is the importance of middleware in Express.js applications?
A.
To handle asynchronous tasks
B.
To execute code during the request-response cycle
C.
To manage frontend routing
D.
To compile JavaScript code
Correct Answer:
B. To execute code during the request-response cycle
Q.
504
How do you create a template literal in ES6?
A.
Using single quotes
B.
Using double quotes
C.
Using backticks
D.
Using curly braces
Correct Answer:
C. Using backticks
Q.
505
Which method is used to start an Express server?
A.
app.start()
B.
app.listen()
C.
app.run()
D.
app.open()
Correct Answer:
B. app.listen()
Q.
506
Which of the following is a key skill for a backend Node.js developer?
A.
Proficiency in JavaScript
B.
Knowledge of HTML and CSS
C.
Understanding of graphic design principles
D.
Experience with mobile app development
Correct Answer:
A. Proficiency in JavaScript
Q.
507
What is the purpose of using environment variables in Node.js applications?
A.
To manage configuration settings
B.
To handle HTTP requests
C.
To write database queries
D.
To style the user interface
Correct Answer:
A. To manage configuration settings
Q.
508
What is the default port used by an Express application if no port is specified?
A.
port 3000
B.
port 8080
C.
port 80
D.
port 5000
Correct Answer:
A. port 3000
Q.
509
Which of the following is a testing framework for Node.js?
A.
Mocha
B.
Jasmine
C.
Jest
D.
All of the above
Correct Answer:
D. All of the above
Q.
510
How do you serve static files in Express?
A.
app.use(express.static(’public’))
B.
app.use(’/public’, express.static(’public’))
C.
app.get(express.static(’public’))
D.
Both a and b
Correct Answer:
D. Both a and b
Q.
511
Which feature of ES6 allows you to copy properties from one or more source objects to a target object?
A.
Spread operator
B.
Object.assign
C.
Rest parameter
D.
Both a and b
Correct Answer:
D. Both a and b
Q.
512
Which middleware is used to parse JSON bodies in Express?
A.
bodyParser.json()
B.
express.json()
C.
bodyParser.urlencoded()
D.
express.urlencoded()
Correct Answer:
B. express.json()
Q.
513
What is the use of the dotenv package in Node.js?
A.
To manage environment variables
B.
To connect to databases
C.
To create HTTP servers
D.
To handle authentication
Correct Answer:
A. To manage environment variables
Q.
514
Which of the following is true about default parameters in ES6?
A.
They are assigned when a function is declared.
B.
They are assigned if no argument is passed or if undefined is passed.
C.
They can be changed during the function execution.
D.
They must be the first parameter in the function.
Correct Answer:
B. They are assigned if no argument is passed or if undefined is passed.
Q.
515
Which of the following is a task runner commonly used in Node.js development?
A.
Gulp
B.
Grunt
C.
npm scripts
D.
All of the above
Correct Answer:
D. All of the above
Q.
516
Which method is used to handle 404 errors in Express?
A.
app.use((req, res, next) => { res.status(404).send(’Not Found’); });
B.
app.use((req, res) => { res.status(404).send(’Not Found’); });
C.
app.error((req, res) => { res.status(404).send(’Not Found’); });
D.
app.get((req, res) => { res.status(404).send(’Not Found’); });
Correct Answer:
A. app.use((req, res, next) => { res.status(404).send(’Not Found’); });
Q.
517
How do you secure a Node.js application?
A.
Using HTTPS
B.
Implementing input validation
C.
Using environment variables for sensitive information
D.
All of the above
Correct Answer:
D. All of the above
Q.
518
What is the output of const x = () => ({ y: 1 }); console.log(x());?
A.
Syntax Error
B.
undefined
C.
{ y: 1 }
D.
() => { y: 1 }
Correct Answer:
C. { y: 1 }
Q.
519
How do you define a route parameter in Express?
A.
app.get(’/:id’, (req, res) => { res.send(req.params.id); });
B.
app.get(’/id’, (req, res) => { res.send(req.params.id); });
C.
app.get(’/id/:id’, (req, res) => { res.send(req.params.id); });
D.
app.param(’/:id’, (req, res) => { res.send(req.params.id); });
Correct Answer:
A. app.get(’/:id’, (req, res) => { res.send(req.params.id); });
Q.
520
What is the purpose of the helmet middleware in Express.js?
A.
To secure HTTP headers
B.
To log HTTP requests
C.
To parse JSON bodies
D.
To manage cookies
Correct Answer:
A. To secure HTTP headers
Q.
521
Which of the following allows iteration over the properties of an object?
A.
for...of
B.
for...in
C.
Array.prototype.forEach
D.
Object.entries
Correct Answer:
B. for...in
Q.
522
Which of the following can be used for API documentation in Node.js?
A.
Swagger
B.
Postman
C.
API Blueprint
D.
All of the above
Correct Answer:
D. All of the above
Q.
523
Which method is used to handle POST requests in Express?
A.
app.get()
B.
app.post()
C.
app.put()
D.
app.delete()
Correct Answer:
B. app.post()
Q.
524
What is the importance of unit testing in Node.js development?
A.
To ensure code quality and functionality
B.
To design the user interface
C.
To handle HTTP requests
D.
To write CSS
Correct Answer:
A. To ensure code quality and functionality
Q.
525
What does the following code output? const foo = ’bar’; console.log(${foo} === ’bar’);
A.
true
B.
false
C.
undefined
D.
Syntax Error
Correct Answer:
A. true
Q.
526
How do you redirect a request in Express?
A.
res.redirect()
B.
res.forward()
C.
res.route()
D.
es.sendRedirect()
Correct Answer:
A. res.redirect()
Q.
527
Which of the following is used to handle authentication in Node.js?
A.
Passport
B.
JWT
C.
OAuth
D.
All of the above
Correct Answer:
D. All of the above
Q.
528
Which of the following correctly destructures an object in ES6?
A.
const { a, b } = { a: 1, b: 2 };
B.
const [ a, b ] = { a: 1, b: 2 };
C.
const { a, b } = [ 1, 2 ];
D.
const ( a, b ) = { a: 1, b: 2 };
Correct Answer:
A. const { a, b } = { a: 1, b: 2 };
Q.
529
Which of the following middleware can be used to parse cookies in Express?
A.
cookie-parser
B.
body-parser
C.
express-cookies
D.
cookie-handler
Correct Answer:
A. cookie-parser
Q.
530
What is the purpose of the pm2 package in Node.js?
A.
To manage and monitor Node.js applications
B.
To handle HTTP requests
C.
To compile JavaScript code
D.
To manage database connections
Correct Answer:
A. To manage and monitor Node.js applications
Q.
531
How do you set a response header in Express?
A.
res.setHeader()
B.
res.header()
C.
res.headers()
D.
res.set()
Correct Answer:
D. res.set()
Q.
532
How do you connect to a MongoDB database in a Node.js application?
A.
Using the mongodb package
B.
Using the mongoose package
C.
Using the mongo-client package
D.
Both a and b
Correct Answer:
D. Both a and b
Q.
533
Which ES6 feature allows you to include expressions in strings?
A.
Template literals
B.
Spread operator
C.
Arrow functions
D.
Default parameters
Correct Answer:
A. Template literals
Q.
534
Which of the following is a logging library for Node.js?
A.
Winston
B.
Bunyan
C.
Morgan
D.
All of the above
Correct Answer:
D. All of the above
Q.
535
What is middleware in Express?
A.
Functions that handle requests and responses.
B.
Functions that are executed after the response is sent.
C.
Functions that handle only error requests.
D.
Functions that are executed during application initialization.
Correct Answer:
A. Functions that handle requests and responses.
Q.
536
What will be the output of console.log([..."hello"]); in ES6?
A.
["h", "e", "l", "l", "o"]
B.
["hello"]
C.
"hello"
D.
Syntax Error
Correct Answer:
A. ["h", "e", "l", "l", "o"]
Q.
537
What is the purpose of the cors middleware in Express.js?
A.
To enable Cross-Origin Resource Sharing
B.
To parse URL-encoded bodies
C.
To handle file uploads
D.
To secure HTTP headers
Correct Answer:
A. To enable Cross-Origin Resource Sharing
Q.
538
How do you handle errors in Express?
A.
app.use((err, req, res, next) => { res.status(500).send(’Server Error’); });
B.
app.get((err, req, res, next) => { res.status(500).send(’Server Error’); });
C.
app.error((err, req, res, next) => { res.status(500).send(’Server Error’); });
D.
app.catch((err, req, res, next) => { res.status(500).send(’Server Error’); });
Correct Answer:
A. app.use((err, req, res, next) => { res.status(500).send(’Server Error’); });
Q.
539
How can you export a variable in ES6?
A.
export var myVar;
B.
module.exports = myVar;
C.
export default myVar;
D.
exports.myVar = myVar;
Correct Answer:
C. export default myVar;
Q.
540
Which of the following is true about the next function in Express middleware?
A.
It passes control to the next middleware function.
B.
It is used to handle errors.
C.
It terminates the request-response cycle.
D.
Both a and b
Correct Answer:
D. Both a and b
Q.
541
What is the use of the find method in ES6?
A.
To find the first element in an array that satisfies a given condition.
B.
To find the index of an element in an array.
C.
To find all elements in an array that satisfy a given condition.
D.
To find the last element in an array.
Correct Answer:
A. To find the first element in an array that satisfies a given condition.
Q.
542
How do you handle JSON Web Tokens (JWT) in Express?
A.
Using the express-jwt middleware.
B.
Using the jsonwebtoken library.
C.
Using the jwt-simple library.
D.
All of the above
Correct Answer:
D. All of the above
Q.
543
Which of the following correctly uses the rest parameter?
A.
function sum(...args) { return args.reduce((acc, val) => acc + val, 0); }
B.
function sum(args...) { return args.reduce((acc, val) => acc + val, 0); }
C.
function sum([args...]) { return args.reduce((acc, val) => acc + val, 0); }
D.
function sum(...args[]) { return args.reduce((acc, val) => acc + val, 0); }
Correct Answer:
A. function sum(...args) { return args.reduce((acc, val) => acc + val, 0); }
Q.
544
How do you set up a session in Express?
A.
Using the express-session middleware.
B.
Using the session-handler middleware.
C.
Using the express-cookie middleware.
D.
Using the session-storage middleware.
Correct Answer:
A. Using the express-session middleware.
Q.
545
Which of the following methods is used to merge arrays in ES6?
A.
Array.prototype.concat
B.
Spread operator
C.
Array.prototype.merge
D.
Both a and b
Correct Answer:
D. Both a and b
Q.
546
Which of the following can be used to handle file uploads in Express?
A.
multer
B.
body-parser
C.
formidable
D.
Both a and c
Correct Answer:
D. Both a and c
Q.
547
Which of the following keywords is used to define a constant variable in ES6?
A.
let
B.
const
C.
var
D.
static
Correct Answer:
B. const
Q.
548
What is the use of the res.json method in Express?
A.
To send a JSON response.
B.
To send a text response.
C.
To send an HTML response.
D.
To send an XML response.
Correct Answer:
A. To send a JSON response.
Q.
549
Which command is used to start the MongoDB server?
A.
mongod
B.
mongo
C.
mongodb
D.
mongoserver
Correct Answer:
A. mongod
Q.
550
Which method is used to remove whitespace from both ends of a string in ES6?
A.
String.prototype.trim
B.
String.prototype.strip
C.
String.prototype.slice
D.
String.prototype.clean
Correct Answer:
A. String.prototype.trim
Q.
551
What is the default port number for MongoDB?
A.
27017 number
B.
28017 number
C.
27018 number
D.
28018 number
Correct Answer:
A. 27017 number
Q.
552
Which ES6 feature allows you to copy an array without referencing the original array?
A.
Array.prototype.slice
B.
Spread operator
C.
Array.prototype.map
D.
Array.prototype.forEach
Correct Answer:
B. Spread operator
Q.
553
Which ES6 feature allows defining a property with the same name as the variable?
A.
Property Shorthand
B.
Destructuring
C.
Template literals
D.
Arrow functions
Correct Answer:
A. Property Shorthand
Q.
554
Which of the following is true about Node.js?
A.
It is a server-side framework.
B.
It is built on the V8 JavaScript engine.
C.
It is primarily used for CPU-intensive applications.
D.
It cannot handle asynchronous operations.
Correct Answer:
B. It is built on the V8 JavaScript engine.
Q.
555
Which data format is used to store data in MongoDB?
A.
XML
B.
BSON
C.
JSON
D.
CSV
Correct Answer:
B. BSON
Q.
556
How do you create a new database in MongoDB?
A.
use databaseName
B.
create database databaseName
C.
new database databaseName
D.
db.create(databaseName)
Correct Answer:
A. use databaseName
Q.
557
Which module in Node.js is used for handling file system operations?
A.
fs
B.
http
C.
path
D.
url
Correct Answer:
A. fs
Q.
558
Which of the following is a core module in Node.js?
A.
express
B.
mongodb
C.
http
D.
lodash
Correct Answer:
C. http
Q.
559
How do you insert a document into a collection in MongoDB?
A.
db.collection.insertOne(document)
B.
db.collection.add(document)
C.
db.collection.save(document)
D.
db.collection.create(document)
Correct Answer:
A. db.collection.insertOne(document)
Q.
560
How do you create a server in Node.js using the http module?
A.
http.createServer()
B.
http.createClient()
C.
http.listen()
D.
http.createConnection()
Correct Answer:
A. http.createServer()
Q.
561
Which of the following methods is used to find documents in a MongoDB collection?
A.
db.collection.find()
B.
db.collection.search()
C.
db.collection.query()
D.
db.collection.get()
Correct Answer:
A. db.collection.find()
Q.
562
What does the fs.readFile method do in Node.js?
A.
Reads the content of a file asynchronously.
B.
Reads the content of a file synchronously.
C.
Writes data to a file.
D.
Appends data to a file.
Correct Answer:
A. Reads the content of a file asynchronously.
Q.
563
How do you update a document in MongoDB?
A.
db.collection.updateOne(query, update)
B.
db.collection.modify(query, update)
C.
db.collection.change(query, update)
D.
db.collection.set(query, update)
Correct Answer:
A. db.collection.updateOne(query, update)
Q.
564
How do you install a package using npm?
A.
npm get
B.
npm install
C.
npm add
D.
npm fetch
Correct Answer:
B. npm install
Q.
565
Which of the following is used to delete a document in MongoDB?
A.
db.collection.deleteOne(query)
B.
db.collection.remove(query)
C.
db.collection.drop(query)
D.
db.collection.clear(query)
Correct Answer:
A. db.collection.deleteOne(query)
Q.
566
What is the command to initialize a new Node.js project?
A.
npm init
B.
npm start
C.
npm new
D.
node init
Correct Answer:
A. npm init
Q.
567
What is the use of the ObjectId in MongoDB?
A.
To uniquely identify documents.
B.
To store binary data.
C.
To represent a date and time.
D.
To create indexes.
Correct Answer:
A. To uniquely identify documents.
Q.
568
Which statement is used to import a module in Node.js?
A.
require
B.
import
C.
include
D.
use
Correct Answer:
A. require
Q.
569
Which method is used to count the number of documents in a MongoDB collection?
A.
db.collection.countDocuments()
B.
db.collection.count()
C.
db.collection.size()
D.
db.collection.length()
Correct Answer:
A. db.collection.countDocuments()
Q.
570
What is the default file name for the main module in a Node.js project?
A.
app.js
B.
index.js
C.
main.js
D.
server.js
Correct Answer:
B. index.js
Q.
571
How do you create an index in MongoDB?
A.
db.collection.createIndex(keys, options)
B.
db.collection.addIndex(keys, options)
C.
db.collection.makeIndex(keys, options)
D.
db.collection.setIndex(keys, options)
Correct Answer:
A. db.collection.createIndex(keys, options)
Q.
572
How can you handle exceptions in Node.js?
A.
Using try...catch blocks.
B.
Using error events.
C.
Using process.on(’uncaughtException’, callback).
D.
All of the above
Correct Answer:
D. All of the above
Q.
573
Which of the following is used to create a child process in Node.js?
A.
child_process.spawn
B.
child_process.exec
C.
child_process.fork
D.
All of the above
Correct Answer:
D. All of the above
Q.
574
Which of the following methods is used to aggregate data in MongoDB?
A.
db.collection.aggregate(pipeline)
B.
db.collection.group(pipeline)
C.
db.collection.sum(pipeline)
D.
db.collection.collect(pipeline)
Correct Answer:
A. db.collection.aggregate(pipeline)
Q.
575
What is the purpose of the package.json file in a Node.js project?
A.
To list project dependencies.
B.
To define scripts for automation.
C.
To set project metadata.
D.
All of the above
Correct Answer:
D. All of the above
Q.
576
What is the default storage engine for MongoDB?
A.
WiredTiger
B.
MMAPv1
C.
InnoDB
D.
RocksDB
Correct Answer:
A. WiredTiger
Q.
577
What is the role of the EventEmitter class in Node.js?
A.
To handle HTTP requests.
B.
To manage file system operations.
C.
To facilitate asynchronous event-driven programming.
D.
To manage database connections.
Correct Answer:
C. To facilitate asynchronous event-driven programming.
Q.
578
Which of the following is true about MongoDB?
A.
It is a NoSQL database.
B.
It uses a flexible schema.
C.
It stores data in collections.
D.
All of the above
Correct Answer:
D. All of the above
Q.
579
How do you create a replica set in MongoDB?
A.
rs.initiate()
B.
db.createReplicaSet()
C.
mongo --replicaSet
D.
db.replicaSet.create()
Correct Answer:
A. rs.initiate()
Q.
580
How can you serve static files in Node.js?
A.
Using the express.static middleware.
B.
Using the http.static method.
C.
Using the fs.serveStatic method.
D.
Using the path.serve method.
Correct Answer:
A. Using the express.static middleware.
Q.
581
Which command is used to backup a MongoDB database?
A.
mongodump
B.
mongoexport
C.
mongobackup
D.
mongorestore
Correct Answer:
A. mongodump
Q.
582
Which of the following methods can be used to read a directory in Node.js?
A.
fs.readDirectory
B.
fs.readDir
C.
fs.readdir
D.
fs.listDir
Correct Answer:
C. fs.readdir
Q.
583
How do you restore a MongoDB database from a backup?
A.
mongorestore
B.
mongorecover
C.
mongoload
D.
mongobackup
Correct Answer:
A. mongorestore
Q.
584
How do you set an environment variable in Node.js?
A.
process.setEnv
B.
process.env.VAR_NAME = ’value’
C.
process.setVariable
D.
process.variable.VAR_NAME = ’value’
Correct Answer:
B. process.env.VAR_NAME = ’value’
Q.
585
Which of the following is used to monitor MongoDB performance?
A.
mongotop
B.
mongostat
C.
db.serverStatus()
D.
All of the above
Correct Answer:
D. All of the above
Q.
586
Which of the following methods is used to send a response to the client in a Node.js HTTP server?
A.
res.write
B.
res.send
C.
res.end
D.
Both a and c
Correct Answer:
D. Both a and c
Q.
587
What is sharding in MongoDB?
A.
A method to distribute data across multiple machines.
B.
A method to backup data.
C.
A method to create indexes.
D.
A method to create views.
Correct Answer:
A. A method to distribute data across multiple machines.
Q.
588
Which of the following is true about streams in Node.js?
A.
Streams are used to handle large amounts of data.
B.
Streams are always synchronous.
C.
Streams can be readable, writable, or both.
D.
Both a and c
Correct Answer:
D. Both a and c
Q.
589
How do you check the version of MongoDB?
A.
mongo --version
B.
mongod --version
C.
db.version()
D.
All of the above
Correct Answer:
D. All of the above
Q.
590
Which module in Node.js can be used to create a WebSocket server?
A.
ws
B.
websocket
C.
net
D.
socket
Correct Answer:
A. ws
Q.
591
What is the role of the buffer module in Node.js?
A.
To handle binary data.
B.
To manage HTTP requests.
C.
To handle JSON data.
D.
To manage child processes.
Correct Answer:
A. To handle binary data.
Q.
592
What is React.js?
A.
A JavaScript framework
B.
A JavaScript library
C.
A CSS framework
D.
A backend server
Correct Answer:
B. A JavaScript library
Q.
593
Who developed React.js?
A.
Google
B.
Facebook
C.
Twitter
D.
Microsoft
Correct Answer:
B. Facebook
Q.
594
What is a React component?
A.
A function or class that optionally accepts inputs and returns a React element
B.
A CSS rule
C.
A database
D.
A type of HTTP request
Correct Answer:
A. A function or class that optionally accepts inputs and returns a React element
Q.
595
How do you create a React component using a function?
A.
function MyComponent() { return
Hello World
; }
B.
function MyComponent { return
Hello World
; }
C.
function MyComponent { return "Hello World"; }
D.
function MyComponent() {
Hello World
; }
Correct Answer:
A. function MyComponent() { return
Hello World
; }
Q.
596
What is JSX?
A.
A JavaScript XML
B.
A type of HTTP request
C.
A CSS preprocessor
D.
A database query language
Correct Answer:
A. A JavaScript XML
Q.
597
How do you embed JavaScript expressions in JSX?
A.
Using double quotes
B.
Using curly braces
C.
Using square brackets
D.
Using parentheses
Correct Answer:
B. Using curly braces
Q.
598
What is the purpose of render() in a React component?
A.
To define event handlers
B.
To describe what the UI should look like
C.
To make an HTTP request
D.
To update the state
Correct Answer:
B. To describe what the UI should look like
Q.
599
Which method in a React class component is used to set initial state?
A.
getInitialState
B.
componentWillMount
C.
constructor
D.
render
Correct Answer:
C. constructor
Q.
600
How do you handle state in a functional component?
A.
Using this.setState
B.
Using the useState hook
C.
Using the componentWillReceiveProps method
D.
Using the state object
Correct Answer:
B. Using the useState hook
Q.
601
How can you prevent a component from rendering?
A.
Returning false from render()
B.
Returning null from render()
C.
Using shouldRender method
D.
Using this.state = false
Correct Answer:
B. Returning null from render()
Q.
602
What is a key in React and why is it important?
A.
A unique identifier used to optimize rendering
B.
A reference to the parent component
C.
A way to handle events
D.
A method to fetch data
Correct Answer:
A. A unique identifier used to optimize rendering
Q.
603
Which lifecycle method is called after the component is rendered for the first time?
A.
componentWillUnmount
B.
componentDidUpdate
C.
componentDidMount
D.
componentWillUpdate
Correct Answer:
C. componentDidMount
Q.
604
How do you pass a method from a parent component to a child component?
A.
As a prop
B.
As a state
C.
Using this.bind
D.
Using useEffect
Correct Answer:
A. As a prop
Q.
605
Which hook is used to perform side effects in functional components?
A.
useContext
B.
useEffect
C.
useState
D.
useReducer
Correct Answer:
B. useEffect
Q.
606
Which of the following methods is used to update state in a class component?
A.
updateState
B.
setState
C.
changeState
D.
modifyState
Correct Answer:
B. setState
Q.
607
What is the purpose of the useEffect hook in React?
A.
To handle state updates
B.
To fetch data or run side effects
C.
To create a reference to a DOM element
D.
To manage component lifecycle
Correct Answer:
B. To fetch data or run side effects
Q.
608
How can you conditionally apply a class to a React element?
A.
Using if statements inside render
B.
Using ternary operators inside className
C.
Using a switch statement inside className
D.
Using setState to change the class
Correct Answer:
B. Using ternary operators inside className
Q.
609
Which method is used to remove a component from the DOM?
A.
componentDidMount
B.
componentWillUnmount
C.
componentDidUpdate
D.
componentWillReceiveProps
Correct Answer:
B. componentWillUnmount
Q.
610
What is the virtual DOM in React?
A.
A copy of the real DOM that is kept in memory and synced with the real DOM
B.
A browser API for managing elements
C.
A tool for debugging React components
D.
A feature for optimizing CSS
Correct Answer:
A. A copy of the real DOM that is kept in memory and synced with the real DOM
Q.
611
How can you lift state up in React?
A.
By using higher-order components
B.
By moving state to a common ancestor component
C.
By using context
D.
By using Redux
Correct Answer:
B. By moving state to a common ancestor component
Q.
612
What is a pure component in React?
A.
A component that never re-renders
B.
A component that only re-renders when its props or state change
C.
A component that handles side effects
D.
A component that is always functional
Correct Answer:
B. A component that only re-renders when its props or state change
Q.
613
Which of the following can be used to share logic across React components?
A.
Mixins
B.
Render props
C.
Context
D.
All of the above
Correct Answer:
D. All of the above
Q.
614
What does ReactDOM.render() do?
A.
It updates the state of a component
B.
It compiles JSX into JavaScript
C.
It renders a React element into the DOM
D.
It creates a virtual DOM
Correct Answer:
C. It renders a React element into the DOM
Q.
615
Which React hook should you use for managing form inputs?
A.
useReducer
B.
useEffect
C.
useState
D.
useContext
Correct Answer:
C. useState
Q.
616
What is a higher-order component (HOC) in React?
A.
A component that manages state
B.
A function that takes a component and returns a new component
C.
A method to fetch data from APIs
D.
A component that uses hooks
Correct Answer:
B. A function that takes a component and returns a new component
Q.
617
What is the correct way to handle events in React?
A.
Using the on prefix followed by the event name
B.
Using the addEventListener method
C.
Using inline JavaScript code
D.
Using data attributes
Correct Answer:
A. Using the on prefix followed by the event name
Q.
618
Which of the following is a controlled component in React?
A.
A component that controls its own state
B.
A component that receives its current value as a prop and notifies changes via callbacks
C.
A component that is not affected by state changes
D.
A component that uses refs to access the DOM
Correct Answer:
B. A component that receives its current value as a prop and notifies changes via callbacks
Q.
619
What is the purpose of React.Fragment?
A.
To create a wrapper element in the DOM
B.
To avoid adding extra nodes to the DOM
C.
To render multiple components conditionally
D.
To handle form submissions
Correct Answer:
B. To avoid adding extra nodes to the DOM
Q.
620
How can you memoize a component to prevent unnecessary re-renders?
A.
By using React.memo
B.
By using useEffect
C.
By using useCallback
D.
By using useState
Correct Answer:
A. By using React.memo
Q.
621
What is the use of prop-types in React?
A.
To optimize component performance
B.
To document the intended types of properties passed to components
C.
To manage state in components
D.
To create context in a React application
Correct Answer:
B. To document the intended types of properties passed to components
Q.
622
What is context in React?
A.
A way to pass data through the component tree without having to pass props down manually at every level
B.
A state management tool
C.
A method to create side effects
D.
A lifecycle method
Correct Answer:
A. A way to pass data through the component tree without having to pass props down manually at every level
Q.
623
What does the useContext hook do?
A.
It manages component side effects
B.
It allows a functional component to access context
C.
It triggers a re-render
D.
It replaces useState
Correct Answer:
B. It allows a functional component to access context
Q.
624
What is the significance of keys in lists in React?
A.
They determine the order of elements in the DOM
B.
They help identify which items have changed, are added, or removed
C.
They are used to style list items
D.
They are required to use map function
Correct Answer:
B. They help identify which items have changed, are added, or removed
Q.
625
What is a stateful component in React?
A.
A component that manages its own state
B.
A component that only receives props
C.
A component that uses hooks
D.
A component that does not re-render
Correct Answer:
A. A component that manages its own state
Q.
626
Which of the following hooks is used to create a mutable object that persists for the lifetime of the component?
A.
useState
B.
useEffect
C.
useRef
D.
useReducer
Correct Answer:
C. useRef
Q.
627
How do you create a context in React?
A.
const MyContext = createContext();
B.
const MyContext = new Context();
C.
const MyContext = useContext();
D.
const MyContext = useCreateContext();
Correct Answer:
A. const MyContext = createContext();
Q.
628
What does the useReducer hook do?
A.
It manages state with a reducer function
B.
It replaces the useState hook
C.
It performs side effects in functional components
D.
It creates a context
Correct Answer:
A. It manages state with a reducer function
Q.
629
What is the purpose of React.StrictMode?
A.
To enforce strict typing
B.
To highlight potential problems in an application
C.
To manage state
D.
To optimize performance
Correct Answer:
B. To highlight potential problems in an application
Q.
630
Which method would you use to update the state of a component after an asynchronous operation?
A.
this.setState
B.
this.forceUpdate
C.
this.updateState
D.
this.modifyState
Correct Answer:
A. this.setState
Q.
631
How do you access props in a class component?
A.
this.properties
B.
this.args
C.
this.state
D.
this.props
Correct Answer:
D. this.props
Q.
632
What does the shouldComponentUpdate lifecycle method do?
A.
It forces a component to update
B.
It determines if a component should re-render
C.
It is used to fetch data from an API
D.
It binds event handlers
Correct Answer:
B. It determines if a component should re-render
Q.
633
Which of the following is NOT a feature of React Router?
A.
Route nesting
B.
Code splitting
C.
Lazy loading
D.
Automatic state management
Correct Answer:
D. Automatic state management
Q.
634
What is the purpose of the useLayoutEffect hook?
A.
To perform side effects in a synchronous manner
B.
To handle state updates
C.
To replace useEffect
D.
To manage context
Correct Answer:
A. To perform side effects in a synchronous manner
Q.
635
How do you define default props for a component?
A.
Component.defaultProps = { ... }
B.
Component.props = { ... }
C.
Component.default = { ... }
D.
Component.defaultProperties = { ... }
Correct Answer:
A. Component.defaultProps = { ... }
Q.
636
What is the primary purpose of the React.Children utility?
A.
To validate child components
B.
To manage state in child components
C.
To provide utilities for dealing with the this.props.children opaque data structure
D.
To style child components
Correct Answer:
C. To provide utilities for dealing with the this.props.children opaque data structure
Q.
637
What is the difference between useEffect and useLayoutEffect?
A.
useEffect runs after the DOM updates, useLayoutEffect runs synchronously after all DOM mutations
B.
useLayoutEffect runs after the DOM updates, useEffect runs synchronously after all DOM mutations
C.
useEffect is used for context management, useLayoutEffect is used for state management
D.
There is no difference
Correct Answer:
A. useEffect runs after the DOM updates, useLayoutEffect runs synchronously after all DOM mutations
Q.
638
Which of the following is true about React keys?
A.
They should be unique among sibling elements
B.
They are required for all elements in React
C.
They should be generated randomly each time the component renders
D.
They are used to store state in React
Correct Answer:
A. They should be unique among sibling elements
Q.
639
What is the purpose of the memo function in React?
A.
To memoize the results of expensive calculations
B.
To create context
C.
To prevent unnecessary re-renders of functional components
D.
To manage state
Correct Answer:
C. To prevent unnecessary re-renders of functional components
Q.
640
What does the createRef function do in React?
A.
It creates a reference to a DOM element or class component instance
B.
It manages state updates
C.
It fetches data from APIs
D.
It creates context
Correct Answer:
A. It creates a reference to a DOM element or class component instance
Q.
641
What is the purpose of the useMemo hook in React?
A.
To memoize a function
B.
To memoize a value
C.
To manage state
D.
To handle side effects
Correct Answer:
B. To memoize a value
Q.
642
How can you pass multiple children to a React component?
A.
Using an array of elements
B.
Using React.Fragment or <>...>
C.
Using children prop
D.
All of the above
Correct Answer:
D. All of the above
Q.
643
What is the purpose of the ErrorBoundary component in React?
A.
To handle JavaScript errors in a part of the component tree
B.
To manage component state
C.
To perform side effects
D.
To validate props
Correct Answer:
A. To handle JavaScript errors in a part of the component tree
Q.
644
Which hook is used to optimize performance by preventing re-renders in functional components?
A.
useEffect
B.
useState
C.
useMemo
D.
useRef
Correct Answer:
C. useMemo
Q.
645
How do you force a component to re-render?
A.
this.setState()
B.
this.forceUpdate()
C.
this.updateComponent()
D.
this.renderAgain()
Correct Answer:
B. this.forceUpdate()
Q.
646
What is the primary use of the useRef hook in functional components?
A.
To directly manipulate the DOM.
B.
To manage state.
C.
To perform side effects.
D.
To manage props.
Correct Answer:
A. To directly manipulate the DOM.
Q.
647
Which lifecycle method is invoked just before a component is removed from the DOM?
A.
componentDidMount
B.
componentWillUnmount
C.
componentDidUpdate
D.
componentWillUpdate
Correct Answer:
B. componentWillUnmount
Q.
648
What does props.children contain?
A.
The properties passed to a component.
B.
The state of the component.
C.
The nested elements within a component.
D.
The methods of a component.
Correct Answer:
C. The nested elements within a component.
Q.
649
How can you handle forms in React?
A.
By directly manipulating the DOM.
B.
By using controlled components.
C.
By using uncontrolled components.
D.
Both b and c.
Correct Answer:
D. Both b and c.
Q.
650
What does the useImperativeHandle hook do?
A.
It customizes the instance value that is exposed when using ref in functional components.
B.
It manages state.
C.
It performs side effects.
D.
It sets up subscriptions.
Correct Answer:
A. It customizes the instance value that is exposed when using ref in functional components.
Q.
651
Which hook can be used to optimize the rendering of large lists?
A.
useEffect
B.
useState
C.
useMemo
D.
useCallback
Correct Answer:
C. useMemo
Q.
652
What is the purpose of the default keyword when exporting a React component?
A.
It exports a component that can be imported with any name.
B.
It exports a component with the same name.
C.
It allows multiple components to be exported.
D.
It exports a component as a class.
Correct Answer:
A. It exports a component that can be imported with any name.
Q.
653
How do you handle side effects in React components?
A.
Using useState
B.
Using useEffect
C.
Using useMemo
D.
Using useReducer
Correct Answer:
B. Using useEffect
Q.
654
What is the purpose of the key prop in React lists?
A.
To style list items.
B.
To uniquely identify elements and optimize rendering.
C.
To bind event handlers.
D.
To manage state.
Correct Answer:
B. To uniquely identify elements and optimize rendering.
Q.
655
Which of the following methods can be used to set up a timer in React?
A.
setTimeout
B.
useTimer
C.
createTimer
D.
setInterval
Correct Answer:
A. setTimeout
Q.
656
What is the main advantage of using React.PureComponent?
A.
It ensures the component always re-renders.
B.
It optimizes the component by performing a shallow comparison of props and state.
C.
It allows the component to manage its own state.
D.
It enables the component to handle side effects.
Correct Answer:
B. It optimizes the component by performing a shallow comparison of props and state.
Q.
657
How do you access lifecycle methods in a functional component?
A.
Using class syntax.
B.
Using hooks like useEffect.
C.
Using this keyword.
D.
Using higher-order components.
Correct Answer:
B. Using hooks like useEffect.
Q.
658
What is the role of ReactDOM in a React application?
A.
It provides methods to manage state.
B.
It handles rendering of React components in the DOM.
C.
It manages component lifecycle.
D.
It performs side effects.
Correct Answer:
B. It handles rendering of React components in the DOM.
Q.
659
Which method is used to create an element in React?
A.
React.createElement
B.
React.makeElement
C.
React.buildElement
D.
React.generateElement
Correct Answer:
A. React.createElement
Q.
660
What does the useReducer hook return?
A.
An array containing the current state and a dispatch function.
B.
An object containing the current state and a dispatch function.
C.
A function to update the state.
D.
An array containing the current state and a state updater function.
Correct Answer:
A. An array containing the current state and a dispatch function.
Q.
661
What is the difference between a controlled and uncontrolled component in React?
A.
Controlled components manage their own state, uncontrolled components use refs.
B.
Controlled components use refs, uncontrolled components manage their own state.
C.
Controlled components are stateless, uncontrolled components are stateful.
D.
Controlled components use props, uncontrolled components do not.
Correct Answer:
A. Controlled components manage their own state, uncontrolled components use refs.
Q.
662
What is a React Portal?
A.
A way to render children into a different part of the DOM tree.
B.
A method to manage state.
C.
A lifecycle method.
D.
A way to handle side effects.
Correct Answer:
A. A way to render children into a different part of the DOM tree.
Q.
663
How do you handle errors in React components?
A.
Using try and catch blocks.
B.
Using ErrorBoundary components.
C.
Using componentDidCatch lifecycle method.
D.
Both b and c.
Correct Answer:
D. Both b and c.
Q.
664
How can you optimize the performance of a React application?
A.
Using keys in lists.
B.
Using React.memo.
C.
Using useMemo and useCallback.
D.
All of the above.
Correct Answer:
D. All of the above.
Q.
665
Which of the following is used to handle routing in a React application?
A.
React Route
B.
Redux
C.
Context API
D.
MobX
Correct Answer:
A. React Route
Q.
666
What does the useState hook return?
A.
The current state and a function to update it.
B.
The current state and a reducer function.
C.
A function to fetch data and a function to set data.
D.
The initial state and a function to reset it.
Correct Answer:
A. The current state and a function to update it.
Q.
667
What is the purpose of the contextType property in class components?
A.
To define the type of context
B.
To set default props
C.
To consume context in a class component
D.
To manage state
Correct Answer:
C. To consume context in a class component
Q.
668
Which of the following hooks can be used to perform side effects in a functional component?
A.
useEffect
B.
useState
C.
useRef
D.
useReducer
Correct Answer:
A. useEffect
Q.
669
What does the useTransition hook do?
A.
It manages component transitions.
B.
It provides a way to track the completion of a state update
C.
It defers state updates to improve performance.
D.
It handles side effects.
Correct Answer:
C. It defers state updates to improve performance.
Q.
670
What is the purpose of ReactDOM.createPortal?
A.
To create a new DOM element
B.
To render children into a different part of the DOM tree
C.
To manage state
D.
To handle form submissions
Correct Answer:
B. To render children into a different part of the DOM tree
Q.
671
How do you pass a method as a prop to a child component?
A.
By calling the method in the child component
B.
By using the bind method
C.
By passing it directly as a prop
D.
By using useState
Correct Answer:
C. By passing it directly as a prop
Q.
672
Which hook is used to perform a cleanup function in React?
A.
useState
B.
useReducer
C.
useEffect
D.
useCallback
Correct Answer:
C. useEffect
Q.
673
How do you ensure that a function is only recreated when its dependencies change?
A.
By using useEffect
B.
By using useMemo
C.
By using useCallback
D.
By using useState
Correct Answer:
C. By using useCallback
Q.
674
Which of the following methods can be used to create a context in React?
A.
React.createContext
B.
React.useContext
C.
React.Context
D.
React.create
Correct Answer:
A. React.createContext
Q.
675
What is the primary purpose of React.lazy?
A.
To perform side effects lazily
B.
To load components lazily for code splitting
C.
To manage state
D.
To handle routing
Correct Answer:
B. To load components lazily for code splitting
Q.
676
Which of the following lifecycle methods is invoked just before a component is removed from the DOM?
A.
componentDidMount
B.
componentDidUpdate
C.
componentWillUnmount
D.
getSnapshotBeforeUpdate
Correct Answer:
C. componentWillUnmount
Q.
677
In the context of React Hooks, what will happen if you call the same Hook multiple times in a single component?
A.
React will throw an error.
B.
The last Hook call will override the previous ones.
C.
Each Hook call is independent and maintains its own state.
D.
Hooks can only be called once per component.
Correct Answer:
C. Each Hook call is independent and maintains its own state.
Q.
678
When using React Context, how can you optimize a component to avoid unnecessary re-renders when context values change?
A.
Use React.memo to wrap the component.
B.
Use shouldComponentUpdate to compare props and state.
C.
Use useCallback for any functions passed as context values.
D.
All of the above.
Correct Answer:
D. All of the above.
Q.
679
Which of the following is NOT a valid way to handle side effects in a functional component using React Hooks?
A.
useEffect
B.
useLayoutEffect
C.
useReducer
D.
useCallback
Correct Answer:
D. useCallback
Q.
680
Which of the following is true about using useReducer over useState?
A.
useReducer is better suited for managing complex state logic.
B.
useReducer can only be used in class components.
C.
useReducer always improves performance over useState.
D.
useReducer requires a middleware to function.
Correct Answer:
A. useReducer is better suited for managing complex state logic.
Q.
681
Which of the following lifecycle methods is invoked immediately after a component is mounted in React?
A.
componentWillMount
B.
componentDidMount
C.
componentWillUpdate
D.
componentDidUpdate
Correct Answer:
A. componentWillMount
Q.
682
Which hook can be used to emulate the behavior of componentDidCatch in functional components to handle errors in React?
A.
useEffect
B.
useErrorBoundary
C.
useError
D.
React does not currently provide a built-in hook for error handling in functional components.
Correct Answer:
D. React does not currently provide a built-in hook for error handling in functional components.
Q.
683
In React, what is the primary purpose of using the key prop when rendering a list of elements?
A.
To ensure uniqueness of elements within the list.
B.
To specify the order of elements in the list.
C.
To provide a reference to access elements within the list
D.
To determine the styling of elements in the list.
Correct Answer:
A. To ensure uniqueness of elements within the list.
Q.
684
How do you import a CSS file in a React component?
A.
import styles from './styles.css';
B.
import { styles } from './styles.css';
C.
import './styles.css';
D.
require('./styles.css');
Correct Answer:
C. import './styles.css';
Q.
685
Which of the following is true about React's reconciliation process?
A.
It always updates the entire DOM tree.
B.
It updates only the parts of the DOM that have changed.
C.
It bypasses the virtual DOM.
D.
It is performed manually by the developer.
Correct Answer:
B. It updates only the parts of the DOM that have changed.
Q.
686
What is the purpose of the useCallback hook in React?
A.
To create a callback function that doesn't change unless its dependencies change.
B.
To fetch data from an API.
C.
To create a mutable reference object.
D.
To manage state.
Correct Answer:
A. To create a callback function that doesn't change unless its dependencies change.
Q.
687
How does the React.memo higher-order component (HOC) help improve performance?
A.
It prevents the component from updating unless its props have changed.
B.
It memoizes the component's state.
C.
It keeps a reference to the component to avoid re-creation.
D.
It ensures the component is always re-rendered when its parent updates.
Correct Answer:
A. It prevents the component from updating unless its props have changed.
Q.
688
How can you prevent a function component from re-rendering in React when its props haven't changed?
A.
Use React.memo to wrap the component.
B.
Use PureComponent instead of a function component.
C.
Use the useEffect hook to compare props.
D.
Use the shouldComponentUpdate method.
Correct Answer:
A. Use React.memo to wrap the component.