0% found this document useful (0 votes)
20 views50 pages

Internet Applications Final Part

The document is a comprehensive quiz covering various aspects of HTML, CSS, JavaScript, and their related concepts. It includes questions about syntax, elements, attributes, and properties used in web development. The quiz format consists of multiple-choice questions aimed at assessing knowledge in web technologies.

Uploaded by

amr997730
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views50 pages

Internet Applications Final Part

The document is a comprehensive quiz covering various aspects of HTML, CSS, JavaScript, and their related concepts. It includes questions about syntax, elements, attributes, and properties used in web development. The quiz format consists of multiple-choice questions aimed at assessing knowledge in web technologies.

Uploaded by

amr997730
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Internet Applications

Final Part (HTML, CSS, JS, React, PHP)


1) What is HTML?
a) HTML describes the structure of a webpage
b) HTML is the standard markup language mainly used to create web pages
c) HTML consists of a set of elements that helps the browser how to view the
content
d) All of the mentioned

2) HTML stands for __________


a) HyperText Markup Language
b) HyperText Machine Language
c) HyperText Marking Language
d) HighText Marking Language

3) What is the correct syntax of doctype in HTML5?


a) </doctype html>
b) <doctype html>
c) <doctype html!>
d) <!DOCTYPE html>

4) Which of the following is used to read an HTML page and render it?
a) Web server c) Web browser
b) Web network d) Web matrix

5) Which of the following tag is used for inserting the largest heading in
HTML?
a) head
b) <h1>
c) <h6>
d) heading

Y.Mostafa
6) In which part of the HTML metadata is contained?
a) head tag
b) title tag
c) html tag
d) body tag

7) Which element is used to get highlighted text in HTML5?


a) <u>
b) <mark>
c) <highlight>
d) <b>

8) How do we write comments in HTML?


a) </…….>
b) <!……>
c) </……/>
d) <…….!>

9) Which of the following elements in HTML5 defines video or movie content?


a) <video>
b) <movie>
c) <audio>
d) <media>

10) Which element is used for styling HTML5 layout?


a) CSS c) JavaScript
b) jQuery d) PHP

11) Which HTML tag is used for making character appearance bold?
a) <u>content</u>
b) <b>content</b>
c) <br>content</br>
d) <i>content</i>
Y.Mostafa
12) Which HTML tag is used to insert an image?
a) <img url=“htmllogo.jpg” />
b) <img alt=“htmllogo.jpg” />
c) <img src=“htmllogo.jpg” />
d) <img link=“htmllogo.jpg” />

13) Which character is used to represent when a tag is closed in HTML?


a) #
b) !
c) /
d) \

14) Which of the following HTML code will make an image clickable?
a)
<a href="https://www.Facebook.com/">Facebook Home Page</a>
b)
<img src="https://www.Facebook.com/Facebook-logo">
<a href="https://www.Facebook.com/">Facebook Home Page</a>
</img>
c)
<a href="https://www.Facebook.com/">Facebook Home Page</a>
<img src="https://www.Facebook.com/Facebook-logo" />
d)
<a href="https://www.Facebook.com/"><img src="https://www.Facebook.com/Facebook-logo" /></a>

15) Among the following, which is the HTML paragraph tag?


a) <p> c) <hr>
b) <pre> d) <br>

16) In HTML, which attribute is used to create a link that opens in a new
window tab?
a) src="_blank"
b) alt=“_blank”
c) target=“_self”
d) target=“_blank”
Y.Mostafa
17) Which HTML element is used for short quote?
a) <em>
b) <abbr>
c) <q>
d) <blockquote>

18) Which of the following HTML tag is used to create an unordered list?
a) <ol>
b) <ul>
c) <li>
d) <ll>

19) Which of the following HTML tag is used to add a row in a table?
a) <th>
b) <td>
c) <tr>
d) <tt>

20) Which tag is used to create a numbered list in HTML?


a) <ol> c) <li>
b) <ul> d) <ll>

21) How to create a checkbox in HTML Form?


a) <input type=“text”>
b) <input type=“textarea”>
c) <input type=“checkbox”>
d) <input type=“button”>

22) Which tag is used to create a blank line in HTML?


a) <b>
b) <br>
c) <em>
d) <a>
Y.Mostafa
23) Which HTML tag is used to convert the plain text into italic format?
a) <b>
b) <p>
c) <i>
d) <a>

24) Which HTML element is used for YouTube videos?


a) <samp>
b) <small>
c) <frame>
d) <iframe>

25) 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 mentioned

26) Which of the following tag is used to embed css in html page?
a) <css>
b) <!DOCTYPE html>
c) <script>
d) <style>

27) Which of the following has introduced text, list, box, margin, border, color,
and background properties?
a) HTML
b) PHP
c) CSS
d) Ajax

Y.Mostafa
28) Which of the following CSS selector is used to specify a rule to bind a
particular unique element?
a) tag
b) id
c) class
d) both class and tag

29) Which of the following type of HTML tag is used to define an internal style
sheet?
a) <script> c) <class>
b) <link> d) <style>

30) 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

31) What will be the output of following CSS code snippet?


h1 {color: "green";}

a) nothings happen
b) error occurs
c) heading becomes dark-green
d) heading becomes green

32) Which of the following CSS style property is used to specify an italic text?
a) style
b) font
c) font-style
d) @font-face

Y.Mostafa
33) 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

34) Which of the following is the correct syntax to link an external style sheet
in the HTML file?
a) <link rel=“stylesheet” href=“style.css” />
b) <link rel=“stylesheet” src=“style.css” />
c) <style rel=“stylesheet” src=“style.css” />
d) <style rel=“stylesheet” link=“style.css” />

35) Which of the following CSS property can be used to set the image as a
border instead of the border style?
a) background-image-source
b) background-image
c) border-image-source
d) border-image

36) 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 <head> section of an HTML page
d) all of the mentioned

37) Which of the following CSS property sets the font size of text?
a) font-size
b) text-size
c) text
d) size

Y.Mostafa
38) 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

39) Which of the following CSS property is used to set the color of the text?
a) text-decoration c) colour
b) pallet d) color

40) Which of the following CSS Property controls how an element is


positioned?
a) static c) fix
b) position d) set

41) Which of the following is an appropriate value for the overflow element?
a) scroll c) auto
b) hidden d) all of the mentioned

42) What will be the output of the following CSS code?


div {
border-width:5px;
border-style:dotted solid double dashed;
}
a) Box having dotted bottom outline, solid right outline, double top outline and
dashed left outline
b) Box having dotted bottom outline, solid left outline, double top outline and
dashed left outline
c) Box having dotted top outline, solid right outline, double bottom outline and
dashed left outline
d) Box having dotted top outline, solid left outline, double bottom outline and
dashed right outline

Y.Mostafa
43) What is JavaScript?
a) JavaScript is a scripting language used to make the website interactive
b) JavaScript is an assembly language used to make the website interactive
c) JavaScript is a compiled language used to make the website interactive
d) None of the mentioned

44) Which of the following is correct about JavaScript?


a) JavaScript is an Object-Based language
b) JavaScript is Assembly-language
c) JavaScript is an Object-Oriented language
d) JavaScript is a High-level language

45) What will be the output of the following JavaScript code snippet?
<p id="demo"></p>
var txt1 = "Facebook-";
var txt2 = "Login Page";
document.getElementById("demo").innerHTML = txt1 + txt2;

a) error
b) Facebook- Login Page
c) undefined
d) Facebook-Login Page

46) What will be the output of the following JavaScript code?


<p id="demo"></p>
<script>
var js = 10;
js *= 5;
document.getElementById("demo").innerHTML = js;
</script>

a) 10
b) 50
c) 5
d) Error

Y.Mostafa
47) Arrays in JavaScript are defined by which of the following statements?
a) It is an ordered list of values
b) It is an ordered list of objects
c) It is an ordered list of string
d) It is an ordered list of functions

48) What will be the output of the following JavaScript code?


function compare()
{
let a=2;
let b=2.0;
if(a==b)
return true;
else
return false;
}

a) false
b) true
c) compilation error
d) runtime error

49) What will be the output of the following JavaScript code snippet?
function equalto()
{
let num=10;
if(num==="10")
return true;
else
return false;
}

a) false
b) true
c) compilation error
d) runtime error

Y.Mostafa
50) What happens in the following JavaScript code snippet?
var js = 0;
while (js < 10)
{
console.log(js);
js++;
}

a) An exception is thrown
b) The values of js are logged or stored in a particular location or storage
c) The value of js from 0 to 9 is displayed in the console
d) An error is displayed

51) What will be the result or type of error if p is not defined in the following
JavaScript code snippet?
console.log(p)

a) Value not found Error


b) Reference Error
c) Null
d) Zero

52) What will be the firstname and surname of the following JavaScript
program?
var book = {
"main title": "JavaScript",
'sub-title': "The Definitive Guide",
"for": "all audiences",
author: {
firstname: "David",
surname: "Flanagan"
}
};

a) objects c) properties
b) property names d) property values

Y.Mostafa
53) What will be the output of the following JavaScript code?
function totalelements()
{
var allgenders=document.getElementsByName("gender");
alert("Total Genders:"+allgenders.length);
}
<form>
<input type="radio" name="gender" value="male">
<input type="radio" name="gender" value="female">
<input type="button" onclick="totalelements()" value="Total Genders">
</form>

a) 0 c) 2
b) Error d) 1

54) What will be the output of the following JavaScript code?


function counth2()
{
var totalh2=document.getElementsByTagName("h2");
alert(totalh2.length);
}
<h2>hello</h2>
<h2>hello</h2>

a) 0
b) hello
c) h2
d) 2

55) What will be the output of the following JavaScript code?


<p>1</p>
<p>2</p>
<p>3</p>
function myFunction()
{
var x = document.getElementsByTagName("p").item(0);
alert(x.innerHTML);
}

a) 1
b) 2
c) 3
d) Error
Y.Mostafa
56) What will be the output of the following JavaScript code?
<p>1</p>
<p>2</p>
<p>3</p>
function myFunction()
{
var l = document.getElementsByTagName("p").length;
alert(l);
}

a) 1 c) 3
b) 2 d) Error

57) What is the effect of the <b> 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.

58) 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

59) 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

60) Which attribute is used to provide a unique name to an HTML element?


a) id
b) class
c) type
d) None of the above
Y.Mostafa
61) 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.

62) 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

63) Which HTML element is used to define description data?


a) <li>
b) <ol>
c) <dd>
d) <dl>

64) 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

65) How are quotations defined in HTML?


a) <quote>
b) <block>
c) <blockquote>
d) None of the above

Y.Mostafa
66) What tag is used to render an image on a webpage?
a) img
b) src
c) image
d) None of the above

67) Which of the following tags represents an independent piece of content of


a document in HTML5:
a) section
b) article
c) aside
d) header

68) Which of the following represents a section of content intended for


navigation in HTML5:
a) footer
b) nav
c) section
d) Dialog

69) The following elements <header>, <filter>, <article>, <section> are the
new elements in HTML5. These element are called:
a) control attributes
b) Semantic
c) Graphic
d) Multimedia

70) Which of the following browsers does HTML5 support:


a) safari
b) Firefox
c) Internet Explorer
d) all of the above

Y.Mostafa
71) Apart from <i> tag, which of the following tag is used to render a text in
italics?
a) <em>
b) <strong>
c) <b>
d) None of the above

72) What is the correct syntax to write an HTML comment?


a) <!-- Comment -->
b) // Comment
c) # Comment
d) /* Comment */

73) Which property is used to set colors in HTML?


a) Color
b) background-color
c) font-color
d) text-color

74) Which HTML tag is called the root element of an HTML document?
a) <html>
b) <body>
c) <title>
d) <head>

75) Which of the following tags is used to add a row to a table in HTML?
a) <tr>
b) <td>
c) <th>
d) None of the above

Y.Mostafa
76) 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.

77) In how many ways can CSS be written in?


a) 1 c) 3
b) 2 d) 4

78) Which HTML tag is used to declare internal CSS?


a) <style>
b) <link>
c) <script>
d) None of the above

79) How can we select an element with a specific Class in CSS?


a) #
b) .
c) ^
d) None of the above

80) What value should be passed to the width parameter if we want an


element, say a table, to span the entire width of the screen?
a) 100%
b) 50%
c) 0%
d) None of the above

81) Which of the following CSS property sets what kind of line decorations are
added to an element, such as underlines, overlines, etc?
a) text-decoration c) text-decoration-line
b) text-style d) text-line

Y.Mostafa
82) Which of the following CSS property is used to set the color of the text?
a) text-decoration
b) pallet
c) colour
d) color

83) Which of the following CSS Property controls how an element is


positioned?
a) static
b) position
c) fix
d) set

84) CSS stands for __________


a) Color Style Sheets
b) Cascade Sheets Style
c) Cascade Style Sheet
d) Cascading Style Sheets

85) In CSS, h1 can be called as _______


a) Selector
b) Attribute
c) Value
d) Tag

86) In css, “color:red” can be called as _____________


a) Selector
b) Rule
c) Declaration
d) Value

Y.Mostafa
87) Which of the following attributes is used to specify elements to bind style
rules to?
a) id
b) class
c) tag
d) all of the mentioned

88) Which one is the HTML document’s root tag?


a) <head>
b) <body>
c) <title>
d) <html>

89) How can a datatype be declared to be a constant type?


a) const
b) var
c) let
d) constant

90) What is the purpose of the "return" statement in a function?


a) To print a value to the console
b) To exit the function and return a value
c) To declare a variable
d) To concatenate strings

91) What is the purpose of the "querySelectorAll" method in JavaScript?


a) Selects the first element that matches a specified CSS selector
b) Selects all elements that match a specified CSS selector
c) Selects the last element that matches a specified CSS selector
d) Selects an element by its ID

Y.Mostafa
92) What will be the output for the following code snippet?
<p id="example"></p>
<script>
function Func()
{
document.getElementById("example").innerHTML= Math.sqrt(25);
}
</script>

a) 9 c) Error
b) 5 d) 0

93) Which of the following is the correct output for the following JavaScript
code:
Int x=8;
if(x>9)
{
document.write(9);
}
else
{
document.write(x);
}

a) 9 c) 8
b) 0 d) Undefined

94) In JavaScript the x===y statement implies that:


a) Both x and y are equal in value, type and reference address as well.
b) Both are x and y are equal in value only.
c) Both are equal in the value and data type.
d) Both are not same at all.

95) Which one of the following is correct output for the following given
JavaScript code:
1. string X= "Good";
2. string Y="Evening";
3. alert(X+Y);

a) Good c) GooodEvening
b) Evening d) Undefined

Y.Mostafa
96) What will be the output of the following JavaScript code snippet?
int a=1;
if(a!=null)
return 1;
else
return 0;

a) 0
b) 1
c) compiler error
d) runtime error

97) See the given code of JavaScript and choose the correct output from the
var string1 = "40";
var valueinit = 50;
alert (string1+ valueinit);

a) 4090 c) 4050
b) 90 d) Exception

98) Which one of the following the correct output for the given JavaScript
code?
var a = 0;
var b = 0;
while (a < 3)
{a++;
b+=a;
console.log(b);}

a) 136
b) 123
c) 013
d) 01

99) The statement a === b refers to _______


a) both a and b are equal in value, type and the reference address
b) both will be are equal in value
c) both a and b are equal in value and type
d) There is no such statement

Y.Mostafa
100) Which of the following is the correct output for the following JavaScript
code:
var x=3;
var y=2;
var z=0;
if(x===y)
document.write(x);
elseif(x===y)
document.write(x);
else
document.write(z);

a) 3
b) 0
c) Error
d) 2

101) Let's set of unordered Properties that, has a name and value is called
_____
a) string
b) array
c) serialized object
d) Object

102) Which HTML element is used to put JavaScript code?


a) <javascript>
b) <js>
c) <scripting>
d) <script>

103) How do you comment a single line in JavaScript?


a) //
b) /* */
c) #
d) ---

Y.Mostafa
104) In which part of the HTML metadata is contained?
a) body tag
b) html tag
c) head tag
d) title tag

105) How to create a hyperlink in HTML?


a) <a link = "www.thinkandlearn.com"> thinkandlearn.com </a>
b) <a> www.thinkandlearn.com </a>
c) <a href = "www.thinkandlearn.com"> thinkandlearn.com </a>
d) <a href = “http://www.thinkandlearn.com”> thinkandlearn.com </a>

106) What is the correct syntax for referring an external CSS?


a) <link rel="stylesheet" type="text/css" href="style.css">
b) <style rel="stylesheet" type="text/css" href="style.css">
c) <style type="text/css" href="style.css">
d) None of the above

107) Which of the following are valid ways to represent a colour in CSS?
a) Valid color name only
b) RGB values
c) HEX values
d) All of the above

108) The correct sequence of HTML tags for starting a webpage is…
a) Head, Title, HTML, Body
b) HTML, Body, Title, Head
c) HTML, Head, Title, Body
d) HTML, Head, Body, Title

109) HTML document can contain


a) Tags c) Attributes
b) Plain Text d) All
Y.Mostafa
110) What are the three components of the front end of any working website?
a) HTML, CSS, Javascript
b) HTML only
c) Javascript only
d) Node.js

111) In HTML, we use <hr> tag for:


a) horizontal ruler
b) new line
c) new paragraph
d) vertical ruler

112) Which tag do we use in HTML for inserting a line-break?


a) <br>
b) <div>
c) <em>
d) <pre>

113) In HTML, the correct way of commenting out something would be using:
a) ## and #
b) <!-- and -->
c) /* and */
d) </ and >

114) Which tag is used in HTML5 for the initialization of the document type?
a) <Doctype HTML>
b) <!DOCTYPE html>
c) <Doctype>
d) <!Doctype html>

115) Which one is the HTML document’s root tag?


a) <head> c) <title>
b) <body> d) <html>
Y.Mostafa
116) What does the abbreviation HTML stand for?
a) HyperText Markup Language
b) HighText Markup Language
c) HyperText Markdown Language
d) None of the above

117) Which tag do we use to define the options present in the drop-down
selection lists?
a) <list>
b) <option>
c) <dropdown>
d) <select>

118) 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) Right, Bottom, Left, Top
d) Right, Left, Top, Bottom

119) How many sizes of headers are available in HTML by default?


a) 10
b) 3
c) 6
d) 5

120) How can we change the background color of an element?


a) background-color
b) color
c) Both A and B
d) None of the above

Y.Mostafa
121) What is the smallest header in HTML by default?
a) h1
b) h2
c) h6
d) h4

122) How to create an ordered list in HTML?


a) <ol>
b) <ul>
c) <li>
d) <dl>

123) What is meant by an empty tag in HTML?


a) One that has no attribute
b) One that has no content
c) One that has no closing tag
d) One that has no opening tag

124) Correct HTML tag for the largest heading is:


a) <h6>
b) <heading>
c) <h1>
d) <head>

125) Which of the following is not an attribute of <form>:


a) Action
b) Method
c) Name
d) URL

126) All HTML tags are must be Enclosed In:


a) ?And! c) {And}
b) </And> d) #And#
Y.Mostafa
127) The Body Tag (or Meta Tag) is usually used after:
a) EM tag c) Head tag
b) Title tag d) HTML tag

128) GIF and JPG are the 2 main types of:


a) Videos c) Animated effects
b) Images d) HTML tag

129) To start a list using circles use:


a) <ul Type= “circle”>
b) <ul Type= “round”>
c) <ul = “round”>
d) <ul “round”>

130) Which tag is used if you want to indicate the importance of phrase:
a) <checkbox>
b) <Input type = “checkbox”>
c) <cb>
d) <Input type “checkbox”>

131) What does PHP stand for?


a) PHP stands for Preprocessor Home Page
b) PHP stands for Pretext Hypertext Processor
c) PHP stands for Hypertext Preprocessor
d) PHP stands for Personal Hyper Processor

132) What should be the correct syntax to write a PHP code?


a) < php >
b) < ? php ?>
c) <? ?>
d) <?php ?>

Y.Mostafa
133) Which of the following is the correct way to add a comment in PHP code?
a) #
b) //
c) /* */
d) All of the mentioned

134) What will be the output of the following PHP code?


<?php
$x = 4;
$y = 3;
$z = 1;
$z = $z + $x + $y;
echo '$z';
?>
a) 15
b) 8
c) 1
d) $z

135) Which of the following is the default file extension of PHP files?
a) .php
b) .ph
c) .xml
d) .html

136) How to define a function in PHP?


a) functionName(parameters) {function body}
b) function {function body}
c) function functionName(parameters) {function body}
d) data type functionName(parameters) {function body}

137) Which is the right way of declaring a variable in PHP?


a) $3hello c) $this
b) $_hello d) $5_Hello

Y.Mostafa
138) What will be the output of the following PHP program?
<?php
$fruits = array ("apple", "orange", array ("pear", "mango"),"banana");
echo (count($fruits, 1));
?>

a) 6
b) 5
c) 4
d) 3

139) What will be the output of the following PHP code?


<?php
$x = 4;
$y = 3
$z = 1;
$z = $z + $x + $y;
echo "$z";
?>

a) 15
b) 8
c) 1
d) $z

140) What will be the output of the following PHP program?


<?php
$i = 5;
while (--$i > 0 && ++$i)
{
print $i;
}
?>

a) 555555555…infinitely
b) 54321
c) error
d) 5

Y.Mostafa
141) What will be the output of the following PHP code?
<?php
$names = array("Sam", "Bob", "Jack");
echo $names[0] . "is the brother of " . $names[1] . " and " . $names[2] . ".";
?>

a) Sam is the brother of Bob and Jack.


b) Samis the brother of Bob and Jack.
c) Sam is the brother of Jack and Bob.
d) Error

142) What will be the output of the following PHP code?


<?php
$cars = array("Volvo", "BMW", "Toyota");
echo "I like " . $cars[0] . ", " . $cars[1] . " and " . $cars[2] . ".";
?>

a) I like Volvo BMW and Toyota.


b) I like Volvo, BMW and Toyota)
c) I like Volvo, BMW and Toyota.
d) I like. Volvo.,. BMW. and. Toyota)

143) What will be the output of the following PHP code?


function mine($num)
{
$num = 2 + $num;
echo $num;
}
mine(3);
?>

a) 3
b) $num
c) 5
d) None of the mentioned

Y.Mostafa
144) What will be the output of the following PHP code?
<?php
function movie($int)
{
$movies = array("Fight Club", "Kill Bill", "Pulp Fiction");
echo "You Do Not Talk About ". $movies[$int];
}
movie(0);
?>

a) You Do Not Talk About Fight Club


b) You Do Not Talk About Kill Bill
c) You Do Not Talk About Pulp Fiction
d) None of the mentioned

145) Which of the conditional statements is/are supported by PHP?


i) if statements
ii) if-else statements
iii) if-elseif statements
iv) switch statements
a) Only i)
b) i), ii) and iv)
c) ii), iii) and iv)
d) i), ii), iii) and iv)

146) What will be the output of the following PHP code?


<?php
$states = array("Karnataka" => array ("population" => "11,35,000",
"capital" => "Bangalore"),
"Tamil Nadu" => array( "population" => "17,90,000","capital" => "Chennai") );
echo $states["Karnataka"]["capital"];
?>

a) Karnataka 11,35,000
b) Bangalore
c) population Bangalore
d) Bangalore population

Y.Mostafa
147) Which of the following PHP statement/statements will store 111 in
variable num?
i) int $num = 111;
ii) int mum = 111;
iii) $num = 111;
iv) 111 = $num;

a) Both i) and ii)


b) i), ii), iii) and iv)
c) Only iii)
d) Only i)

148) What will be the output of the following PHP code?


<?php
$num = 1;
$num1 = 2;
print $num . "+". $num1;
?>

a) 3
b) 1+2
c) 1.+.2
d) Error

149) What will be the output of the following PHP code?


<?php
$num = 1;
$num1 = 2;
print $num + $num1;
?>

a) 3
b) 1+2
c) Error
d) 12

Y.Mostafa
150) Which of the below statements is equivalent to $add += $add1?
a) $add = $add
b) $add = $add1 +$add
c) $add = $add + 1
d) $add = $add + $add + 1

151) What will be the output of the following PHP code?


<?php
$a = "clue";
$a .= "get";
echo "$a";
?>

a) get
b) true
c) false
d) clueget

152) Which of the below symbols is a newline character?


a) \r c) /n
b) \n d) /r

153) What will be the output of the following PHP code?


<?php
$num = 10;
echo 'What is her age? \n She is $num years old';
?>

a) What is her age? \n She is $num years old


b) What is her age?
She is $num years old
c) What is her age? She is 10 years old
d) What is her age?
She is 10 years old

Y.Mostafa
154) What will be the output of the following PHP code?
<?php
$team = "arsenal";
switch ($team) {
case "manu":
echo "I love manu";
case "arsenal":
echo "I love arsenal";
case "manc":
echo "I love manc"; }
?>

a) I love arsenal
b) Error
c) I love arsenalI love manc
d) I love arsenalI love mancI love manu

155) What will be the output of the following PHP code?


<?php
$team = " manu";
switch ($team) {
case "manu":
echo "I love manu";
break;
case "arsenal":
echo "I love arsenal";
break;
case "manc":
echo "I love manc";
break; }
?>

a) I love manu
b) Error
c) I love arsenalI love manc
d) I love arsenalI love mancI love manu

Y.Mostafa
156) Which of the looping statements is/are supported by PHP?
i) for loop
ii) while loop
iii) do-while loop
iv) foreach loop
a) i) and ii)
b) i), ii) and iii)
c) i), ii), iii) and iv)
d) Only iv)

157) What will be the output of the following PHP code?


<?php
$a1 = array("red", "green");
$a2 = array("blue", "yellow");
print_r(array_merge($a1, $a2));
?>

a) Array ( [0] => red [1] => green)


b) Array ( [0] => blue [1] => yellow [2] => red [3] => green )
c) Array ( [0] => red [1] => green [2] => blue [3] => yellow )
d) Array ( [0] => blue [1] => yellow )

158) What will be the output of the following PHP code?


<?php
$a = array("red", "green", "blue");
array_pop($a);
print_r($a);
?>
a) Array ( [0] => red [1] => green )
b) Array ( [0] => green [1] => blue )
c) Array ( [0] => red [1] => blue )
d) Array ( [0] => blue [1] => blue )

Y.Mostafa
159) What will be the output of the following PHP code?
<?php
$fruits = array ("mango", "apple", "peach", "pear");
$fruits = asort ($fruits);
printr ($fruits);
?>
a) Array ( [1] => apple [0] => mango [2] => peach [3] => pear )
b) Array ( [0] => apple [1] => mango [2] => peach [3] => pear )
c) Error
d) Array ( [1] => apple [0] => mango [3] => peach [2] => pear )

160) What will be the output of the following PHP code?


<?php
$arr = array ("picture1.JPG", "picture2.jpg",
"Picture10.jpg", "picture20.jpg");
sort($arr);
print_r($arr);
?>
a) Array ( [0] => picture1.JPG [1] => Picture10.jpg [2] => picture2.jpg [3] =>
picture20.jpg )
b) Array ( [0] => picture1.JPG [1] => picture2.jpg [2] => Picture10.jpg [3] =>
picture20.jpg )
c) Array ( [0] => Picture10.jpg [1] => picture1.JPG [2] => picture2.jpg [3] =>
picture20.jpg )
d) Array ( [0] => Picture10.jpg [1] => picture1.JPG [2] => picture20.jpg [3] =>
picture2.jpg )

Y.Mostafa
161) What will be the output of the following PHP code?
<?php
$face = array ("A", "J", "Q", "K");
$number = array ("2","3","4", "5", "6", "7", "8", "9", "10");
$cards = array_merge ($number, $face);
print_r ($cards);
?>

a) Array ( [0] => A [1] => J [2] => Q [3] => K [4] => 2 [5] => 3 [6] => 4 [7] => 5 [8] => 6
[9] => 7 [10] => 8 [11] => 9 [12] => 10 )
b) Array ( [0] => A [1] => 2 [2] => J [3] => 3 [4] => Q [5] => 4 [6] => K [7] => 5 [8] => 6
[9] => 7 [10] => 8 [11] => 9 [12] => 10 )
c) Error
d) Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => 7 [6] => 8 [7] => 9 [8] => 10
[9] => A [10] => J [11] => Q [12] => K )

162) What will be the output of the following PHP code?


<?php
$i = 5;
while (--$i > 0)
{
$i++;
print $i;
print "hello";
}
?>

a) 4hello4hello4hello4hello4hello…..infinite
b) 5hello5hello5hello5hello5hello…..infinite
c) no output
d) error

Y.Mostafa
163) What will be the output of the following PHP code?
<?php
$i = 5;
while (--$i > 0 || ++$i)
{
print $i;
}
?>

a) 54321111111….infinitely
b) 555555555…infinitely
c) 54321
d) 4321111111….infinitely

164) What will be the output of the following PHP code?


<?php
$colors = array("red","green","blue","yellow");
foreach ($colors as $value)
{
echo "$value <br>";
}
?>

a) red
green
blue
yellow
b) red
c) no output
d) error

165) What will be the output of the following PHP code?


echo "This"."was"."a"."bad"."idea";

a) This, was, a, bad, idea


b) This was a bad idea
c) Thiswasabadidea
d) Error

Y.Mostafa
166) What will be the output of the following PHP code?
<?php
$i = 0;
while($i = 10)
{
print "hi";
}
print "hello";
?>

a) hello
b) infinite loop
c) hihello
d) error

167) Which company developed React?


a) Google
b) Meta
c) Microsoft
d) Amazon

168) What is the primary difference between Angular and React in terms of
their type?
a) Angular is a library, React is a framework
b) Angular is a framework, React is a library
c) Both are frameworks
d) Both are libraries

169) Why does React use a Virtual DOM?


a) To completely replace the Real DOM every time data changes
b) To compare changes and update only modified elements in the Real DOM
c) To store data permanently in the browser
d) To render HTML directly without JavaScript

Y.Mostafa
170) What is the release year of Angular?
a) 2013
b) 2009
c) 2010
d) 2016

171) Which of the following is NOT a prerequisite for learning React?


a) Knowledge of HTML and CSS
b) Knowledge of TypeScript
c) Knowledge of JavaScript
d) Knowledge of Git

172) What does JSX stand for in the context of React?


a) JavaScript XML
b) JavaScript Extension
c) Java Syntax
d) JavaScript XHTML

173) When was React first deployed on Facebook’s News Feed?


a) 2013 c) 2011
b) 2012 d) 2010

174) Which of the following scenarios is a good reason to use React?


a) When building static, non-interactive websites
b) When developing a dynamic, interactive UI like a dashboard
c) When avoiding JavaScript entirely
d) When focusing solely on backend development

175) What is a key benefit of React’s component-based architecture?


a) It eliminates the need for JavaScript
b) It allows for reusable components to build scalable applications
c) It simplifies database management
d) It removes the need for CSS
Y.Mostafa
176) Which library influenced Jordan Walke in creating React?
a) jQuery c) AngularJS
b) XHP d) Vue.js

177) What is the correct way to check if Node.js is installed on your device?
a) Open terminal and type npm -v
b) Open terminal and type node -v
c) Open browser and type node –version
d) Open editor and type node install

178) Which of the following is a characteristic of JSX?


a) All elements must be placed inside one parent element
b) Elements do not need to be closed
c) It does not follow XML rules
d) It is used only for backend development

179) What type of DOM does Angular use?


a) Virtual DOM
b) Real DOM
c) Shadow DOM
d) Hybrid DOM

180) Which company does NOT use React, according to the PDF?
a) Facebook c) Google
b) Netflix d) Airbnb

181) What is the purpose of the ReactDOM.createRoot function in the


provided HTML example?
a) To create a new HTML file
b) To initialize a React component
c) To create a root node for rendering React components
d) To manage CSS styles

Y.Mostafa
182) Which of the following is a reason React is considered easy to learn?
a) It requires advanced TypeScript knowledge
b) It is a simple library with many tutorials available
c) It is a complex framework like Angular
d) It does not rely on JavaScript

183) What was the early prototype of React called?


a) ReactJS c) XHP
b) FaxJS d) JSX

184) When did AngularJS reach the end of its life?


a) December 31, 2021
b) August 29, 2023
c) December 31, 2016
d) May 2013

185) Which of the following is true about React’s rendering?


a) It supports only client-side rendering
b) It supports only server-side rendering
c) It supports both client and server-side rendering
d) It does not support rendering

186) Why is a strong community support important for React?


a) It ensures React is proprietary
b) It allows coders worldwide to improve and teach the technology
c) It limits access to React tutorials
d) It prevents React from being open-source

187) Which language is primarily used by Angular?


a) JavaScript
b) TypeScript
c) Python
d) PHP
Y.Mostafa
188) In the provided basic React app example, what is the output of the App
component?
a) Welcome to React
b) Hello, world!
c) React App
d) JSX Example

189) What makes React suitable for large projects?


a) Its complexity in setup
b) Its ability to create UI components without complexity
c) Its reliance on TypeScript
d) Its lack of community support

190) Which of the following is a benefit of React’s Virtual DOM?


a) It slows down performance
b) It updates the entire Real DOM for every change
c) It improves performance by updating only changed elements
d) It eliminates the need for a Real DOM

191) What is the learning curve of React compared to Angular?


a) Steep
b) Moderate
c) Very easy
d) Complex

192) React is a framework, not a library.


a) True e) False

193) JSX follows XML rules, requiring all elements to be closed.


a) True e) False

194) Angular was released after React.


a) True e) False

Y.Mostafa
195) React can be used directly in HTML files for testing purposes.
a) True e) False

196) Knowledge of Node.js and npm is a prerequisite for React development.


a) True e) False

197) React is trusted by companies like Tesla and PayPal because it is a high-
quality tool.
a) True e) False

198) AngularJS is still actively updated by Google as of 2023.


a) True e) False

199) React’s Virtual DOM makes processing slower compared to a Real DOM.
a) True e) False

Y.Mostafa
Model Answer Final Part
1. d) All of the mentioned
2. a) HyperText Markup Language
3. d) <!DOCTYPE html>
4. c) Web browser
5. b) <h1>
6. a) head tag
7. b) <mark>
8. b) <!……>
9. a) <video>
10. a) CSS
11. b) <b>content</b>
12. c) <img src=“htmllogo.jpg” />
13. c) /
14. d)
<a href="https://www.Facebook.com/"><img src="https://www.Facebook.com/Facebook-logo" /></a>
15. a) <p>
16. d) target=“_blank”
17. c) <q>
18. b) <ul>
19. c) <tr>
20. a) <ol>
21. c) <input type=“checkbox”>
22. b) <br>
23. c) <i>
24. d) <iframe>
25. d) All of the mentioned
26. d) <style>
27. c) CSS
28. b) id
29. d) <style>
30. b) font-weight: bold
31. a) nothings happen
32. c) font-style
33. b) only font-style: italic works
34. a) <link rel=“stylesheet” href=“style.css” />
35. c) border-image-source
36. d) all of the mentioned

Y.Mostafa
37. a) font-size
38. c) All span elements will have a outer green dotted border and an inner red
border
39. d) color
40. b) position
41. d) all of the mentioned
42. c) Box having dotted top outline, solid right outline, double bottom outline and
dashed left outline
43. a) JavaScript is a scripting language used to make the website interactive
44. a) JavaScript is an Object-Based language
45. d) Facebook-Login Page
46. b) 50
47. a) It is an ordered list of values
48. b) true
49. a) false
50. c) The value of js from 0 to 9 is displayed in the console
51. b) Reference Error
52. b) property names
53. c) 2
54. d) 2
55. a) 1
56. c) 3
57. a) It converts the text within it to bold font
58. b) An empty tag does not require a closing tag
59. a) Width and height
60. a) id
61. a) It is used to add styles to an HTML element
62. a) <tagname style="property: value;">
63. c) <dd>
64. a) font-family
65. c) <blockquote>
66. a) img
67. b) article
68. b) nav
69. b) Semantic
70. d) all of the above
71. a) <em>
72. a) <!-- Comment -->
73. a) Color
Y.Mostafa
74. a) <html>
75. a) <tr>
76. d) All of the above
77. c) 3
78. a) <style>
79. b) .
80. a) 100%
81. a) text-decoration
82. d) color
83. b) position
84. d) Cascading Style Sheets
85. a) Selector
86. c) Declaration
87. d) all of the mentioned
88. d) <html>
89. a) const
90. b) To exit the function and return a value
91. b) Selects all elements that match a specified CSS selector
92. b) 5
93. c) 8
94. c) Both are equal in the value and data type
95. c) GoodEvening
96. b) 1
97. c) 4050
98. a) 136
99. c) both a and b are equal in value and type
100. c) Error
101. d) Object
102. d) <script>
103. a) //
104. c) head tag
105. d) <a href="http://www.thinkandlearn.com"> thinkandlearn.com </a>
106. a) <link rel="stylesheet" type="text/css" href="style.css">
107. d) All of the above
108. c) HTML, Head, Title, Body
109. d) All
110. a) HTML, CSS, Javascript
111. a) horizontal ruler

Y.Mostafa
112. a) <br>
113. b) <!-- and -->
114. b) <IDOCTYPE html>
115. d) <html>
116. a) HyperText Markup Language
117. b) <option>
118. a) Top, Right, Bottom, Left
119. c) 6
120. a) background-color
121. c) h6
122. a) <ol>
123. b) One that has no content
124. c) <h1>
125. d) URL
126. b) </And>
127. c) Head tag
128. b) Images
129. a) <ul Type="circle">
130. b) <Input type = “checkbox”>
131. c) PHP stands for Hypertext Preprocessor
132. d) <?php ?>
133. d) All of the mentioned
134. d) $z
135. a) .php
136. c) function functionName(parameters) {function body}
137. b) $_hello
138. a) 6
139. b) 8
140. a) 555555555…infinitely
141. b) Samis the brother of Bob and Jack.
142. c) I like Volvo, BMW and Toyota.
143. c) 5
144. a) You Do Not Talk About Fight Club
145. d) i), ii), iii) and iv)
146. b) Bangalore
147. c) Only iii)
148. b) 1+2
149. a) 3

Y.Mostafa
150. b) $add = $add1 +$add
151. d) clueget
152. b) \n
153. a) What is her age? \n She is $num years old
154. c) I love arsenalI love manc
155. a) I love manu
156. c) i), ii), iii) and iv)
157. c) Array ( [0] => red [1] => green [2] => blue [3] => yellow )
158. a) Array ( [0] => red [1] => green )
159. c) Error
160. c) Array ( [0] => Picture10.jpg [1] => picture1.JPG [2] => picture2.jpg [3] =>
picture20.jpg )
161. d) Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => 7 [6] => 8 [7] => 9 [8]
=> 10 [9] => A [10] => J [11] => Q [12] => K )
162. b) 5hello5hello5hello5hello5hello…..infinite
163. d) 4321111111….infinitely
164. a) red
green
blue
yellow
165. c) Thiswasabadidea
166. b) infinite loop
167. b) Meta
168. b) Angular is a framework, React is a library
169. b) To compare changes and update only modified elements in the Real DOM
170. b) 2009
171. b) Knowledge of TypeScript
172. a) JavaScript XML
173. c) 2011
174. b) When developing a dynamic, interactive UI like a dashboard
175. b) It allows for reusable components to build scalable applications
176. b) XHP
177. b) Open terminal and type node -v
178. a) All elements must be placed inside one parent element
179. b) Real DOM
180. c) Google
181. c) To create a root node for rendering React components
182. b) It is a simple library with many tutorials available
183. b) FaxJS

Y.Mostafa
184. a) December 31, 2021
185. c) It supports both client and server-side rendering
186. b) It allows coders worldwide to improve and teach the technology
187. b) TypeScript
188. b) Hello, world!
189. b) Its ability to create UI components without complexity
190. c) It improves performance by updating only changed elements
191. b) Moderate
192. e) False
193. a) True
194. e) False
195. a) True
196. a) True
197. a) True
198. e) False
199. e) False

Y.Mostafa

You might also like