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 Python Quiz
Home
Quiz
Fullstack Python 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
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.
2
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.
3
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.
4
What is a lint ?
A.
C compiler
B.
Interactive debugger
C.
Analyzing tool
D.
C interpreter
Correct Answer:
C. Analyzing tool
Q.
5
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.
6
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.
7
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.
8
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.
9
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.
10
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.
11
Directives are translated by the
A.
Pre-processor
B.
Compiler
C.
Linker
D.
Editor
Correct Answer:
A. Pre-processor
Q.
12
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.
13
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.
14
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.
15
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.
16
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.
17
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.
18
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.
19
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.
20
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.
21
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.
22
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.
23
Which of the following cannot be a variable name in C ?
A.
volatile
B.
true
C.
friend
D.
export
Correct Answer:
A. volatile
Q.
24
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.
25
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.
26
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.
27
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.
28
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.
29
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.
30
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.
31
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.
32
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.
33
What is #include ?
A.
Preprocessor directive
B.
Inclusion directive
C.
File inclusion directive
D.
None of the mentioned
Correct Answer:
A. Preprocessor directive
Q.
34
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.
35
The C-preprocessors are specified with _________ symbol.
A.
#
B.
$
C.
""
D.
&
Correct Answer:
A. #
Q.
36
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.
37
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.
38
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.
39
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.
40
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.
41
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.
42
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.
43
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.
44
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.
45
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.
46
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.
47
C Language is a successor to which language ?
A.
FORTRAN
B.
D Language
C.
BASIC
D.
B Language
Correct Answer:
D. B Language
Q.
48
C is a which level language ?
A.
Low Level
B.
High Level
C.
Low + High
D.
None
Correct Answer:
B. High Level
Q.
49
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.
50
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.
51
C is _______ type of programming language ?
A.
Object Oriented
B.
Procedural
C.
Bit level language
D.
Functional
Correct Answer:
B. Procedural
Q.
52
Who invented C++ ?
A.
Dennis Ritchie
B.
Ken Thompson
C.
Brian Kernighan
D.
Bjarne Stroustrup
Correct Answer:
D. Bjarne Stroustrup
Q.
53
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.
54
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.
55
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.
56
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.
57
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.
58
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.
59
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.
60
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.
61
The operator used for dereferencing or indirection is ____
A.
*
B.
&
C.
->
D.
->>
Correct Answer:
A. *
Q.
62
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.
63
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.
64
What does a class in C++ holds ?
A.
data
B.
functions
C.
both data & functions
D.
arrays
Correct Answer:
C. both data & functions
Q.
65
Which other keywords are also used to declare the class?
A.
class
B.
union
C.
object
D.
struct
Correct Answer:
A. class
Q.
66
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.
67
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.
68
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.
69
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.
70
Which special character is used to mark the end of class ?
A.
;
B.
:
C.
#
D.
$
Correct Answer:
A. ;
Q.
71
Which of the following operators can't be overloaded ?
A.
::
B.
-
C.
+
D.
[]
Correct Answer:
A. ::
Q.
72
Which keyword is used to represent a friend function ?
A.
friend
B.
Friend
C.
friend_func
D.
Friend_func
Correct Answer:
A. friend
Q.
73
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.
74
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.
75
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.
76
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.
77
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.
78
Which of the following is the address operator ?
A.
@
B.
#
C.
&
D.
%
Correct Answer:
C. &
Q.
79
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.
80
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.
81
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.
82
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.
83
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.
84
Which of the following is not a type of inheritance ?
A.
Multiple
B.
Distributive
C.
Multilevel
D.
Hierarchical
Correct Answer:
B. Distributive
Q.
85
Which of the following is called insertion operator ?
A.
<<
B.
>>
C.
>
D.
<
Correct Answer:
A. <<
Q.
86
Which of the following is called extraction operator ?
A.
<<
B.
>>
C.
>
D.
<
Correct Answer:
B. >>
Q.
87
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.
88
Which of the following is C++ equivalent for scanf() ?
A.
cin
B.
cout
C.
print
D.
input
Correct Answer:
A. cin
Q.
89
Which of the following is the scope resolution operator ?
A.
.
B.
*
C.
::
D.
~
Correct Answer:
C. ::
Q.
90
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.
91
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.
92
What do vectors represent ?
A.
Static arrays
B.
Dynamic arrays
C.
Stack
D.
Queue
Correct Answer:
B. Dynamic arrays
Q.
93
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.
94
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.
95
Which data type is used to represent the absence of parameters ?
A.
int
B.
void
C.
short
D.
float
Correct Answer:
B. void
Q.
96
The value 132.54 can be represented using which data type ?
A.
float
B.
void
C.
int
D.
bool
Correct Answer:
A. float
Q.
97
What is syntax of defining a constructor of class A ?
A.
a()
B.
~A()
C.
A()
D.
~A();
Correct Answer:
C. A()
Q.
98
There are ___ levels of heading in HTML
A.
Three
B.
Four
C.
Five
D.
Six
Correct Answer:
D. Six
Q.
99
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.
100
html comment should be enclosed between
A.
<!-- and -->
B.
<-- and -->
C.
<- and ->
D.
none of the above
Correct Answer:
A. <!-- and -->
Q.
101
_____ tag is used before beginning of the paragraph text
A.
<textarea>
B.
<sup>
C.
<p>
D.
<h1>
Correct Answer:
C. <p>
Q.
102
Example of picture editing software is
A.
ms paint
B.
photoshop
C.
animator pro
D.
none of the above
Correct Answer:
B. photoshop
Q.
103
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.
104
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.
105
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.
106
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.
107
to get the ordered list we use
A.
<HI>
B.
<UL>
C.
<OL>
D.
<ML>
Correct Answer:
C. <OL>
Q.
108
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.
109
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.
110
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.
111
The HTML attribute used to define the internal stylesheet is___________
A.
style
B.
<style>
C.
<link>
D.
<script>
Correct Answer:
B. <style>
Q.
112
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.
113
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.
114
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.
115
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.
116
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.
117
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.
118
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.
119
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.
120
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.
121
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.
122
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.
123
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.
124
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.
125
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.
126
Are the negative values allowed in padding property?
A.
No
B.
Yes
C.
Can’t say
D.
May be
Correct Answer:
A. No
Q.
127
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.
128
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.
129
In how many ways can CSS be added to HTML?
A.
One
B.
Two
C.
Three
D.
Infinite
Correct Answer:
C. Three
Q.
130
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.
131
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.
132
HTML is what type of language ?
A.
Scripting Language
B.
Markup Language
C.
Programming Language
D.
Network Protocol
Correct Answer:
B. Markup Language
Q.
133
Which HTML tag produces the biggest heading?
A.
<h7>
B.
<h9>
C.
<h4>
D.
<h1>
Correct Answer:
D. <h1>
Q.
134
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.
135
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.
136
The page title is inside the____tag.
A.
Body
B.
Head
C.
Division
D.
Table
Correct Answer:
B. Head
Q.
137
<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.
138
<TD>...</TD> tag is used to ________
A.
Table Heading
B.
Table Data
C.
Table row
D.
none of the above
Correct Answer:
Q.
139
Which tag is used to create body text in HTML?
A.
<HEAD>
B.
<TEXT>
C.
<TITLE>
D.
<BODY>
Correct Answer:
D. <BODY>
Q.
140
Which plugin is used to cycle through elements, like a slideshow?
A.
orbit
B.
slideshow
C.
scrollspy
D.
carousel
Correct Answer:
D. carousel
Q.
141
Which plugin is used to create a modal window?
A.
modal
B.
window
C.
dialog Box
D.
popup
Correct Answer:
A. modal
Q.
142
Which plugin is used to create a tooltip?
A.
popup
B.
tooltip
C.
modal
D.
dialog Box
Correct Answer:
B. tooltip
Q.
143
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.
144
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.
145
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.
146
How many Container class are there in Bootstrap?
A.
one
B.
Two
C.
Three
D.
Four
Correct Answer:
B. Two
Q.
147
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.
148
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.
149
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.
150
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.
151
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.
152
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.
153
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.
154
What is the tag for an inline frame?
A.
Iframe
B.
Inframe
C.
frame
D.
inlineframe
Correct Answer:
A. Iframe
Q.
155
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.
156
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.
157
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.
158
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.
159
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.
160
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.
161
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.
162
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.
163
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.
164
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.
165
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.
166
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.
167
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.
168
How can we select an element with a specific ID in CSS ?
A.
#
B.
.
C.
^
D.
None of the above
Correct Answer:
A. #
Q.
169
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.
170
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.
171
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.
172
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.
173
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.
174
We enclose HTML tags within ?
A.
< >
B.
{ }
C.
! !
D.
None of the above
Correct Answer:
A. < >
Q.
175
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.
176
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.
177
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.
178
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.
179
What is the smallest header in HTML by default?
A.
h1
B.
h4
C.
h2
D.
h6
Correct Answer:
D. h6
Q.
180
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.
181
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.
182
We enclose HTML tags within?
A.
{}
B.
<>
C.
!!
D.
None of the above
Correct Answer:
B. <>
Q.
183
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.
184
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.
185
How to display preformatted text in HTML?
A.
<p>
B.
<hr>
C.
<pre>
D.
All of the above
Correct Answer:
C. <pre>
Q.
186
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.
187
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.
188
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.
189
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.
190
Which HTML element is used to define description data?
A.
<li>
B.
<dl>
C.
<ol>
D.
<dd>
Correct Answer:
D. <dd>
Q.
191
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.
192
How are quotations defined in HTML?
A.
<quote>
B.
<block>
C.
<blockquote >
D.
None of the above
Correct Answer:
C. <blockquote >
Q.
193
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.
194
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.
195
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.
196
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.
197
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.
198
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.
199
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.
200
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.
201
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.
202
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.
203
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.
204
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.
205
Which function is used to open a file in C?
A.
open()
B.
fopen()
C.
file_open()
D.
fileopen()
Correct Answer:
B. fopen()
Q.
206
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.
207
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.
208
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.
209
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.
210
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.
211
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.
212
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.
213
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.
214
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.
215
Which feature of OOPS described the reusability of code?
A.
Abstraction
B.
Encapsulation
C.
Polymorphism
D.
Inheritance
Correct Answer:
D. Inheritance
Q.
216
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.
217
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.
218
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.
219
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.
220
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.
221
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.
222
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.
223
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.
224
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.
225
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.
226
The default value of the BORDER attribute is?
A.
1 pixel
B.
2pixel
C.
4pixel
D.
8pixel
Correct Answer:
A. 1 pixel
Q.
227
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.
228
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.
229
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.
230
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.
231
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.
232
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.
233
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.
234
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.
235
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.
236
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.
237
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.
238
Inline styles are written within the attribute.
A.
style
B.
css
C.
stylesheet
D.
Both A. and B.
Correct Answer:
A. style
Q.
239
CSS comments are placed within the
A.
//
B.
/* and */
C.
<* and *>
D.
<! and !>
Correct Answer:
B. /* and */
Q.
240
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.
241
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.
242
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.
243
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.
244
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.
245
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.
246
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.
247
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.
248
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.
249
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.
250
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.
251
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.
252
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.
253
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.
254
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.
255
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.
256
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.
257
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.
258
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.
259
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.
260
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.
261
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.
262
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.
263
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.
264
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.
265
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.
266
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.
267
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.
268
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.
269
HTML elements are positioned by default.
A.
static
B.
fixed
C.
relative
D.
none
Correct Answer:
A. static
Q.
270
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.
271
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.
272
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.
273
Which CSS function uses the largest value?
A.
large()
B.
maximum()
C.
max_value()
D.
max()
Correct Answer:
D. max()
Q.
274
Which CSS function uses the smallest value?
A.
small()
B.
minimum()
C.
min_value()
D.
min()
Correct Answer:
D. min()
Q.
275
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.
276
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.
277
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.
278
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.
279
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.
280
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.
281
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.
282
what means 4 times the size of the current font.
A.
4px
B.
4 pt.
C.
4vw
D.
4em
Correct Answer:
D. 4em
Q.
283
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.
284
What is the CSS Entity for the character "#"?
A.
0023
B.
0026
C.
0027
D.
None of the above.
Correct Answer:
A. 0023
Q.
285
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.
286
Which selector selects the markers of list items?
A.
::marker
B.
.marker
C.
::selector
D.
None of these
Correct Answer:
A. ::marker
Q.
287
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.
288
Which of the following CSS properties are animatable?
A.
color
B.
animation
C.
flex
D.
All of the above.
Correct Answer:
B. animation
Q.
289
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.
290
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.
291
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.
292
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.
293
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.
294
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.
295
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.
296
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.
297
Is border-image property animatable?
A.
Yes
B.
No
C.
Both A and B.
D.
None of these
Correct Answer:
B. No
Q.
298
Which cursor property value indicates that the program is busy?
A.
help
B.
default
C.
auto
D.
wait
Correct Answer:
D. wait
Q.
299
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.
300
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.
301
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.
302
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.
303
Which one is a fallback font?
A.
Georgia
B.
Times New Roman
C.
Serif
D.
None of the above.
Correct Answer:
C. Serif
Q.
304
Where do we store external stylesheets?
A.
CSS files
B.
HTML files
C.
Folder
D.
None of these
Correct Answer:
A. CSS files
Q.
305
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.
306
The Hex Code for the white color is
A.
#FFFFFF
B.
#FOFOOO
C.
#FOOOOF
D.
None of the above.
Correct Answer:
A. #FFFFFF
Q.
307
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.
308
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.
309
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.
310
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.
311
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.
312
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.
313
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.
314
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.
315
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.
316
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.
317
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.
318
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.
319
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.
320
Which of the following are the CSS Extension Prefixes for Webkit?
A.
-chrome
B.
-web
C.
-o-
D.
-webkit
Correct Answer:
D. -webkit
Q.
321
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.
322
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.
323
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.
324
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.
325
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.
326
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.
327
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.
328
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.
329
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.
330
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.
331
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.
332
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.
333
The Default Value Of "position" Attribute Is
A.
Fixed
B.
Absolute
C.
Inherit
D.
Static
Correct Answer:
D. Static
Q.
334
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.
335
CSS is written in which language?
A.
PHP
B.
HTML
C.
JAVA
D.
python
Correct Answer:
B. HTML
Q.
336
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.
337
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.
338
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.
339
<TITLE> ... tag must be within _______
A.
Title
B.
Form
C.
Header
D.
Body
Correct Answer:
C. Header
Q.
340
Text within ... <STRONG> tag is displayed as _____
A.
bold
B.
italic
C.
list
D.
indented
Correct Answer:
A. bold
Q.
341
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.
342
<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.
343
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.
344
<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.
345
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.
346
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.
347
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.
348
____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.
349
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.
350
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.
351
________ is a collection of web pages.
A.
Browser
B.
Internet
C.
WWW
D.
Web site
Correct Answer:
D. Web site
Q.
352
What is the correct HTML tag for inserting a line break?
A.
< br>
B.
<pre >
C.
< hr>
D.
< td>
Correct Answer:
A. < br>
Q.
353
Webpage starts with which of the following tag?
A.
<html >
B.
<hltm >
C.
<htlm >
D.
None of these
Correct Answer:
A. <html >
Q.
354
JPG sometimes called ________.
A.
JPEG
B.
JPGG
C.
JPEE
D.
JJP
Correct Answer:
A. JPEG
Q.
355
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.
356
< 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.
357
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.
358
Which tag inserts a line horizontally on your web page?
A.
<hr>
B.
<br>
C.
<b>
D.
<del>
Correct Answer:
A. <hr>
Q.
359
What should be the first tag in any HTML document?
A.
<html>
B.
<body>
C.
<head>
D.
<hmtl>
Correct Answer:
A. <html>
Q.
360
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.
361
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.
362
Choose the correct HTML tag to make a text italic
A.
<i>
B.
<ii>
C.
<u>
D.
<ol>
Correct Answer:
A. <i>
Q.
363
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.
364
Which of the following is not a pair tag?
A.
<p>
B.
<li>
C.
<h1>
D.
<img>
Correct Answer:
D. <img>
Q.
365
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.
366
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.
367
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.
368
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.
369
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.
370
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.
371
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.
372
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.
373
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.
374
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.
375
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.
376
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.
377
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.
378
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.
379
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.
380
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.
381
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.
382
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.
383
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.
384
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.
385
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.
386
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.
387
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.
388
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.
389
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.
390
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.
391
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.
392
Which of the following class indicates a successful or positive action?
A.
.active
B.
.danger
C.
.success
D.
.warning
Correct Answer:
C. .success
Q.
393
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.
394
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.
395
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.
396
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.
397
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.
398
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.
399
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.
400
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.
401
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.
402
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.
403
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.
404
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.
405
Which class is used to create a badge?
A.
.badge-item
B.
.badge-label
C.
.label-badge
D.
.badge
Correct Answer:
D. .badge
Q.
406
Which class is used to create a loader?
A.
.spinner-loader
B.
.loader
C.
.spinner-border
D.
.spinner
Correct Answer:
C. .spinner-border
Q.
407
Which class is used to create a basic pagination?
A.
.navigation
B.
.pages
C.
.pagination
D.
.page
Correct Answer:
C. .pagination
Q.
408
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.
409
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.
410
Which class indicates a dropdown menu?
A.
.dropdown-list
B.
.dropdown
C.
.select
D.
None of these
Correct Answer:
B. .dropdown
Q.
411
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.
412
Which component is used to cycle through elements, like a slideshow?
A.
Scrollspy
B.
Orbit
C.
Carousel
D.
Slideshow
Correct Answer:
C. Carousel
Q.
413
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.
414
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.
415
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.
416
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.
417
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.
418
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.
419
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.
420
The bootstrap class md means for
A.
phones
B.
tablets
C.
small laptops
D.
laptops and desktops
Correct Answer:
C. small laptops
Q.
421
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.
422
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.
423
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.
424
.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.
425
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.
426
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.
427
Which class creates pagination?
A.
pagination
B.
pager
C.
pagination-link
D.
link-pagination
Correct Answer:
A. pagination
Q.
428
Default size of H3 bootstrap heading
A.
18px
B.
30px
C.
26px
D.
24px
Correct Answer:
D. 24px
Q.
429
Which class creates list of items?
A.
lst-group
B.
list-group
C.
menu-group
D.
list-grp
Correct Answer:
B. list-group
Q.
430
Default size of H2 bootstrap heading
A.
20px
B.
24px
C.
30px
D.
36px
Correct Answer:
C. 30px
Q.
431
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.
432
Default size of H1 bootstrap heading
A.
20px
B.
24px
C.
30px
D.
36px
Correct Answer:
D. 36px
Q.
433
Default size of H6 bootstrap heading
A.
10px
B.
12px
C.
14px
D.
16px
Correct Answer:
B. 12px
Q.
434
The bootstrap class xs means for
A.
phones
B.
tablets
C.
desktop
D.
larger desktops
Correct Answer:
A. phones
Q.
435
Bootstrap’s global default font-size is
A.
10px
B.
12px
C.
13px
D.
14px
Correct Answer:
D. 14px
Q.
436
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.
437
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.
438
What is latest version of bootstrap?
A.
version 2
B.
version 4
C.
version 3
D.
version 5
Correct Answer:
D. version 5
Q.
439
Bootstrap is used for
A.
Data
B.
IoT
C.
Bigdata
D.
Web applications
Correct Answer:
D. Web applications
Q.
440
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.
441
Which class is used to create a pagination?
A.
.pagination
B.
.page-item
C.
.page
D.
None of these
Correct Answer:
A. .pagination
Q.
442
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.
443
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.
444
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.
445
Which class to create border in bootstrap?
A.
.boder
B.
.border
C.
.boarder
D.
None of the above.
Correct Answer:
B. .border
Q.
446
In Bootstrap, content must be placed within...
A.
Columns
B.
row
C.
table
D.
None of these
Correct Answer:
A. Columns
Q.
447
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.
448
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.
449
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.
450
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.
451
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.
452
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.
453
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.
454
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.
455
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.
456
__________ 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.
457
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.
458
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.
459
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.
460
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.
461
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.
462
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.
463
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.
464
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.
465
Which HTML attribute is used to define inline styles?
A.
class
B.
style
C.
styles
D.
font
Correct Answer:
B. style
Q.
466
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.
467
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.
468
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.
469
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.
470
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.
471
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.
472
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.
473
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.
474
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.
475
How do you select an element with id demo?
A.
.demo
B.
#demo
C.
demo
D.
None of these
Correct Answer:
B. #demo
Q.
476
How do you select elements with class name test?
A.
#test
B.
classtest
C.
test
D.
.test
Correct Answer:
D. .test
Q.
477
What is the default value of the position property?
A.
absolute
B.
static
C.
fixed
D.
relative
Correct Answer:
B. static
Q.
478
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.
479
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.
480
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.
481
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.
482
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.
483
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.
484
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.
485
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.
486
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.
487
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.
488
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.
489
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.
490
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.
491
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.
492
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.
493
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.
494
Who developed React.js?
A.
Google
B.
Facebook
C.
Twitter
D.
Microsoft
Correct Answer:
B. Facebook
Q.
495
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.
496
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.
497
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.
498
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.
499
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.
500
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.
501
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.
502
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.
503
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.
504
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.
505
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.
506
Which hook is used to perform side effects in functional components?
A.
useContext
B.
useEffect
C.
useState
D.
useReducer
Correct Answer:
B. useEffect
Q.
507
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.
508
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.
509
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.
510
Which method is used to remove a component from the DOM?
A.
componentDidMount
B.
componentWillUnmount
C.
componentDidUpdate
D.
componentWillReceiveProps
Correct Answer:
B. componentWillUnmount
Q.
511
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.
512
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.
513
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.
514
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.
515
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.
516
Which React hook should you use for managing form inputs?
A.
useReducer
B.
useEffect
C.
useState
D.
useContext
Correct Answer:
C. useState
Q.
517
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.
518
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.
519
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.
520
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.
521
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.
522
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.
523
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.
524
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.
525
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.
526
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.
527
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.
528
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.
529
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.
530
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.
531
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.
532
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.
533
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.
534
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.
535
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.
536
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.
537
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.
538
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.
539
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.
540
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.
541
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.
542
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.
543
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.
544
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.
545
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.
546
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.
547
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.
548
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.
549
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.
550
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.
551
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.
552
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.
553
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.
554
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.
555
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.
556
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.
557
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.
558
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.
559
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.
560
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.
561
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.
562
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.
563
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.
564
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.
565
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.
566
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.
567
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.
568
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.
569
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.
570
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.
571
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.
572
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.
573
Which hook is used to perform a cleanup function in React?
A.
useState
B.
useReducer
C.
useEffect
D.
useCallback
Correct Answer:
C. useEffect
Q.
574
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.
575
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.
576
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.
577
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.
578
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.
579
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.
580
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.
581
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.
582
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.
583
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.
584
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.
585
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.
586
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.
587
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.
588
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.
589
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.