Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Web Tech Quiz 3

Total questions: 72

Worksheet time: 52mins

Name
Class
Date
1.

Which of the following explains correctly what happens when a JavaScript program is developed on a Unix Machine?

a)

will work perfectly well on a Windows Machine

b)

will be displayed as JavaScript text on the browser

c)

will throw errors and exceptions

d)

must be restricted to a Unix Machine only

2.

Which of the following is the correct way to add a comment in PHP code?

a)

#

b)

//

c)

/* */

d)

All of the mentioned

3.

Which of the following is the default file extension of PHP files?

a)

.php

b)

.ph

c)

.xml

d)

.html

4.

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}

5.

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

a)

$3hello

b)

$_hello

c)

$this

d)

$5_Hello

6.

Which of the following PHP functions can be used for generating unique ids?

a)

md5()

b)

uniqueid()

c)

mdid()

d)

id()

7.

In the following PHP program, what is/are the properties?

a)

function sample()

b)

echo “This is an example”;

c)

public $name;

d)

class Example

8.

A function in PHP which starts with __ (double underscore) is known as __________

a)

Default Function

b)

User Defined Function

c)

Inbuilt Function

d)

Magic Function

9.

How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions.

a)

10

b)

7

c)

8

d)

9

10.

Which of the following web servers are required to run the PHP script?

a)

Apache and PHP

b)

IIS

c)

XAMPP

d)

Any of the mentioned

11.

Which of the following PHP functions can be used to get the current memory usage?

a)

memory_get_usage()

b)

memory_get_peak_usage()

c)

get_peak_usage()

d)

get_usage()

12.

Which one of the following PHP function is used to determine a file’s last access time?

a)

filetime()

b)

fileatime()

c)

fileltime()

d)

filectime()

13.

What is PHP?

a)

PHP is an open-source programming language

b)

PHP is used to develop dynamic and interactive websites

c)

PHP is a server-side scripting language

d)

All of the mentioned

14.

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

15.

What is the correct syntax to declare a variable in JavaScript?

a)

var x = 5;

b)

x = 5;

c)

let x = 5;

d)

const x : 5;

16.

Which of the following is a valid way to create a function in JavaScript?

a)

function myFunction: { // code }

b)

myFunction() = function() { // code }

c)

function myFunction() { // code }

d)

function:myFunction() { // code }

17.

What does 'NaN' stand for in JavaScript?

a)

Not-a-Variable

b)

Not-a-Value

c)

Not-a-Number

d)

Not-a-String

18.

How do you create an array in JavaScript?

a)

let arr = [];

b)

let arr = {};

c)

let arr = new Array();

d)

let arr = () => {};

19.

What is the purpose of the 'this' keyword in JavaScript?

a)

The 'this' keyword refers to the global scope in JavaScript.

b)

The 'this' keyword in JavaScript is used to refer to the current execution context or the object that is executing the function.

c)

The 'this' keyword is used to declare variables in JavaScript.

d)

The 'this' keyword is used to define classes in JavaScript.

20.

Which operator is used to assign a value to a variable in JavaScript?

a)

=

b)

+=

c)

-=

d)

==

21.

What is the output of 'typeof null' in JavaScript?

a)

undefined

b)

string

c)

number

d)

object

22.

How do you write a single-line comment in JavaScript?

a)

/* This is a single-line comment */

b)

c)

// This is a single-line comment

d)

# This is a single-line comment

23.

What is the correct way to include a PHP file in another PHP file?

a)

require_once 'filename.php';

b)

Use include 'filename.php'; or require 'filename.php';

c)

Use import 'filename.php';

d)

Include 'filename.php' with brackets;

24.

How do you declare a variable in PHP?

a)

$variableName;

b)

var variableName;

c)

variableName$;

d)

declare variableName;

25.

What is the difference between 'echo' and 'print' in PHP?

a)

'echo' returns a value while 'print' does not

b)

'print' can take multiple parameters like 'echo'

c)

'echo' is slower than 'print' in execution time

d)

The main difference is that 'echo' can take multiple parameters and does not return a value, while 'print' can only take one argument and returns 1.

26.

How do you create an associative array in PHP?

a)

$associativeArray = array('key1', 'value1', 'key2', 'value2');

b)

$associativeArray = new Array('key1' => 'value1', 'key2' => 'value2');

c)

$associativeArray = array('key1' => 'value1', 'key2' => 'value2'); // or $associativeArray = ['key1' => 'value1', 'key2' => 'value2'];

d)

$associativeArray = ['key1', 'value1', 'key2', 'value2'];

27.

What symbol is used to denote a variable in PHP?

a)

&

b)

$

c)

%

d)

@

28.

What is the purpose of the 'include' statement in PHP?

a)

To start a new PHP session.

b)

To create a new function in PHP.

c)

The purpose of the 'include' statement in PHP is to include and evaluate a specified file.

d)

To define a variable in PHP.

29.

How do you define a constant in PHP?

a)

Constants in PHP are defined with the syntax constant('CONSTANT_NAME', value);

b)

You define a constant in PHP using define('CONSTANT_NAME', value) or const CONSTANT_NAME = value;.

c)

You can create a constant in PHP by using var CONSTANT_NAME = value;

d)

You define a constant in PHP using set_constant('CONSTANT_NAME', value);

30.

What is the output of '5 + "5"' in JavaScript?

a)

5 + 5

b)

55.0

c)

10

d)

55

31.

How do you check if a variable is an array in PHP?

a)

Use is_array($variable) to check if a variable is an array.

b)

Use check_array($variable) to determine if it's an array.

c)

Use array_check($variable) to verify if it's an array.

d)

Check if gettype($variable) equals 'array'.

32.

What is the correct way to start a session in PHP?

a)

session_start();

b)

start_session();

c)

session_begin();

d)

initialize_session();

33.

How do you concatenate strings in PHP?

a)

Use the ampersand (&) operator to concatenate strings.

b)

Use the comma (,) operator to concatenate strings.

c)

Use the dot (.) operator to concatenate strings.

d)

Use the plus (+) operator to concatenate strings.

34.

What is the purpose of the 'return' statement in a PHP function?

a)

The 'return' statement defines the function's parameters.

b)

The 'return' statement ends the execution of the function.

c)

The 'return' statement sends a value back to the caller of the function.

d)

The 'return' statement is used to declare a variable.

35.

What is the purpose of the 'return' statement in a PHP function?

a)

The 'return' statement defines the function's parameters.

b)

The 'return' statement ends the execution of the function.

c)

The 'return' statement sends a value back to the caller of the function.

d)

The 'return' statement is used to declare a variable.

36.

.......................is a high-level scripting language that is synchronous with client-side scripting

a)

javaScript

b)

php

c)

oracle

d)

None of these

37.

A ..................... scripting is a light weight programming language

a)

java script

b)

php

c)

oracle

d)

none of these

38.

In HTML, JavaScript code is inserted between ........... and tags

a)

script

b)

VER

c)

TITLE

d)

None of these

39.

To access an HTML element, JavaScript can use the ........................ method.

a)

document.getElementById(id)

b)

CONSOLE

c)

COUT

d)

none of these

40.

........................ Is used to show the out put or give message

a)

document.write():

b)

printf

c)

COUT

d)

None of these

41.

Which type of JavaScript language is ___

a)

Object-Oriented

b)

Object-Based

c)

Assembly-language

d)

High-level

42.

The "function" and " var" are known as

a)

Keywords

b)

Data types

c)

Declaration statements

d)

Prototypes

43.

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

a)

< php >

b)

< ? php ?>

c)

<? ?>

d)

</ php />

44.

Which of the following is used to display the output in PHP?

a)
  1. echo

b)
  1. write

c)
  1. print

d)
  1. Both echo and print

45.

Which of the following is the correct way of defining a variable in PHP?

a)
  1. $variable name = value;

b)
  1. $variable_name = value;

c)
  1. $variable_name = value

d)
  1. $variable name as value;

46.

Which of the following is used to end a statement in PHP?

a)
  1. ! (exclamation)

b)
  1. ; (semicolon)

c)
  1. / (slash)

d)
  1. . (dot)

47.

The raw text, images, and other elements included in a web page

a)

website content

b)

website structure

c)

heading

d)

website

48.

The purpose of different pieces of content in a web page, used to help the computer determine how that content should be displayed

a)

Website structure

b)

Website content

c)

Intellectual property

d)

Copyright

49.

The collected information about an individual across multiple websites on the Internet.

a)

Digital Footprint

b)

Website structure

c)

HTML Element

d)

Heading

50.

What for statament parameter sets starting value?

a)

counter

b)

condition

c)

increment/decrement

d)

do-while

51.

What type of webpage that changes its content upon interacting with the user?

a)

Dynamic website

b)

Static Website

c)

Interactive Website

d)

Idle Website

52.

Which of these statements is not true?

a)

The web operates on a client-server model.

b)

Web servers and web browsers speak HTTP to each other and do so using host names, domain names, and IP addresses.

c)

A web server is special software that knows how not to respond to requests for web pages.

d)

None of the above

53.

What is a scripting language designed specifically for use on the web. It has features to aid you in programming the tasks needed to develop dynamic web applications?

a)

Javascript

b)

PHP

c)

HTML

d)

CSS

54.

Which of the these statements is not true?

a)

The web server continues in HTML mode until it encounters a PHP opening tag (<?php).

b)

The web server starts scanning the file in HTML mode. It assumes the statements are HTML and sends them to the browser without any processing.

c)

The web server continues in PHP mode until it encounters a PHP closing tag (?>).

d)

None of the above.

55.

(a)   are containers used to hold information.

56.

Which of these statements were the rule of declaring variable in PHP?

a)

All variable names have a dollar sign ($) in front of them. This tells PHP that it is a variable name.

b)

Variable names must begin with a letter or an underscore. They cannot begin with a number.

c)

Variable names can be any length.

d)

Variable names can include letters, numbers, and underscores only.

e)

All of the above

57.

(a)   are a series of instructions in a file named with an extension that tells the web server

58.

What statement tests conditions, executing a block of statements when a condition is true?

(a)  

59.

The system of files and directories is called _____.

a)

File system

b)

File directory

c)

File Manager

d)

File dataset

60.

What is a way to store information (in variables) to be used across multiple pages?

a)

POST

b)

SESSION

c)

METHOD

d)

ENCRYPT

61.

Look at this series: 201, 202, 204, 207, ... What number should come next?

a)

205

b)

208

c)

210

d)

211

62.

Look at this series: 544, 509, 474, 439, ... What number should come next?

a)

404

b)

414

c)

420

d)

445

63.

9 16 23 30 37 44 51

a)

59 66

b)

56 62

c)

58 66

d)

58 65

e)

54 61

64.

In a certain code, HARYANA is written as 8197151, how is DELHI written in that code?

a)

45389

b)

57389

c)

89654

d)

12547

65.

If in a code language. COULD is written as BNTKC and MARGIN is written as LZQFHM, how will MOULDING be written in that code?

a)

CHMFINTK

b)

LNKTCHMF

c)

LNTKCHMF

d)

NITKHCMF

66.

In a certain code, MONKEY is written as XDJMNL. How is TIGER written in that code?

a)

QDFHS

b)

SDFHS

c)

SDFHS

d)

UJHFS

67.

Direction

Study the data given below and answer the following questions:

‘Royal Monarch Regal’ is written as @ # *,

‘Regal legacy Gold’ is written as * % ?,

‘Hope Gold Life’ is written as % & $,

‘Regal Monarch Morals’ is written as # * ∀

Q. What will be the code for Regal?

a)

%

b)

*

c)

$

d)

#

e)

?

68.

एक लीप ईयर में कितने घंटे होते हैं।

How many hours are there in a leap year?

a)

6570

b)

8760

c)

2470

d)

8784

69.

Which number would replace the underline mark in the series 20, 40, 100, _, 820?

a)

240

b)

260

c)

280

d)

300

70.

What are the missing numbers in this series, 15, 20, 24, 15, 28, 32 15, _, _, 15?

a)

37,41

b)

36,40

c)

38,42

d)

40,44

71.

12, 24, 14, 28, 18, 36, __

a)

24

b)

25

c)

26

d)

28

72.

Find the missing numbers in the series, 4, 20, 7, 14, 10, 8, 13, _, _.

(a)