stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Web Development Revision Quizzes 1-11 Flashcards | StudBud
Explore
/
Web Development Revision Quizzes 1-11
Web Development Revision Quizzes 1-11
99 terms
·
StudBud Administration
·
4 plays
Imported from external platform
Flashcards
99 cards
F
Practice quiz
P
Host live
L
Questions
99
Answers
1
One way to ensure data integrity in a database table is to create:
A record
An index
A field
A primary key
2
Which of the following is a correct way of including a file in another one?
include("myfunc.php");
add file "myfunc.php";
link "myfunc.php";
fopen(""myfunc.php"");
3
When a variable is passed to a PHP script using the URL, it is available in $_GET. What is $_GET?
A Text Field in the database
A Constant
An Array
An Integer variable
4
When should you define a field as being
UNIQUE
:
When the data stored does not contain duplicate values
When the data stored must be of type character
When the data stored is always known
When the data stored contains NULL values
5
hich SQL command would you use to retrieve information from the database?
DELETE
UPDATE
INSERT
SELECT
6
PHP is known to be “loosely typed”. What does that mean?
PHP doesn't support object variables.
PHP only has 2 different variable types.
PHP doesn't have variable types.
PHP handles the types for you.
7
What does this line of code do?
It retrieves the name of the operating system installed in the server
It installs a web server application on the server
It emails the server's administrator
It retrieves the name of the web server application installed on the server
8
Which SQL command would you use to remove an existing record?
INSERT
UPDATE
SELECT
DELETE
9
How would you create a cookie in PHP?
$_COOKIE->name="value";
$_COOKIE["name"]="value";
$_SERVER['cookie'] = "value";
setcookie("value", $value);
10
What would you add to the
<head>
section of a page you stop all search engines from indexing it?
<meta name="block" target="Google">
<meta name="description" content="No indexing please!">
<meta name=“googlebot” content=“noindex”>
<meta name=“robots” content=“noindex”>
11
In the context of SEO, what is the Robots Exclusion Protocol?
An SEO tool published by Google
A standard that defines how to use the Google map API
A language to block users from accessing your homepage
A convention to prevent web robots from accessing all or part of a website
12
The language used to document the artefact of an object-oriented system under development is called:
Web Services Description Language (WSDL)
Unified Modelling Language (UML)
Extensible Markup Language (XML)
Extensible Hypertext Markup Language (XHTML)
13
Web template systems help achieve code separation. Why is code separation such an important concept in web design?
It ensures that all pages are W3C compliant
It makes the pages more secure
It eases code maintenance and localisation of content
It helps produce faster websites
14
The following code: $vals = array(2,3,4);
sets up a variable called $vals equal to 234
sets up an array called $vals and puts 234 into the first element
will cause an error
sets up an array called $vals with three elements
15
Which website do you use to register for a
MySQL
account:
https://canvas.wlv.ac.uk
https://mi-linux.wlv.ac.uk/~oracle/reg12c/orareg.php
https://mi-linux.wlv.ac.uk/facilities/
https://mi-linux.wlv.ac.uk/phpmyadmin/
16
The documentation of the system architecture is of most interest to what type of person:
Technical User
Business Analyst
Solutions or Software Architect
End User
17
Given the following PHP:
the script outputs nothing, the code does not work
the script outputs 11
the script outputs 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
the script outputs 10
18
Which of the following are two of the primary principles that help improve web security?
Semantic URL attacks and SQL injections
filtering input and escaping output
magic_quotes_gpc off and not using htmlentities()
$_GET and $_COOKIE
19
What are
Black Hat
tactics in the context of SEO?
Empty choice
Empty choice
Methods that are generally approved by the search engines
Methods to ensure that search engines know where to find all your pages.
20
Look at the following:
The code will output “First”
The code will output “Second”
The code will output “Third”
The code will not work and return an error.
21
How would you show the existing value in a cookie called "myCookie"?
echo $_COOKIE["myCookie"];
echo $myCookie;
echo $_COOKIE;
echo S_SESSION["myCookie"];
22
The requirements documentation is of most interest to what type of person:
Programmers
Testers
Business Analysts
Everyone involved
23
Need to screenshot
Empty choice
Empty choice
Empty choice
Empty choice
24
Define 'Usability'
Professional looking Website?
Feature-Rich Website
Fashionable looking Website?
Easy to use website?
25
An attack whereby a user tries to pass SQL statements into a website is called:
Semantic URL attacks
Spoofed Form Submissions
SQL injection
Cross-site scripting
26
Which of the following might provide useful information to attackers, and should be switched off in a live environment?
Database encryption
On-screen error reporting
Sessions
Captchas
27
What function would you use to remove all session variables, but keep the session ID?
session_unset();
session_destroy();
unset($_SESSION["ALL"]);
session_removeAll();
28
Which of the following are
not
one of 'Shneiderman's 8 Golden Rules'?
Strive for consistency
Offer informative feedback
Use complimentary colour scheme
Offer simple error handling
29
When clicking on a hyperlink, what kind of HTTP request are you sending to the server?
PUT
POST
GET
DELETE
30
A student called Jane...
UPDATE Student SET mobileNo = '07979123456';
UPDATE Student SET mobileNo = '07979123456' WHERE student_no='1812345';
Empty choice
Empty choice
31
Which PHP function is used to run an SQL statement against a MySQL database?
mysqli_fetch_assoc
mysqli_select_db
mysqli_query
mysqli_connect
32
Which of the following is commonly used as a Template mark-up language (TML)?
SQL
XML
XSLT
CSS
33
A new student called Freda Smith has started this academic year. What SQL command is needed to add her record?
Empty choice
Empty choice
INSERT INTO Student ('Freda Smith');
Empty choice
34
When would you use a “for” loop rather than a “while” loop?
When you need to loop more than 10 times
When you know in advance how many times you need to loop
When you need to use an array
When you don’t know in advance how many times you need to loop
35
Which of the following is a correct way of commenting code in PHP?
Empty choice
# this is a comment
/* this is a comment */
Empty choice
36
How does Ajax increase the responsiveness of web pages?
It uses templates to create reusable interface elements
It exchanges small amounts of data with the server behind the scene
It uses gzip to compress all text assets on the page (e.g. css)
It compresses all images on the page using a lossless algorithm
37
Which of the following is an example of DBMS?
PHP
Apache
Linux
Oracle
38
Which SQL command would you use to add a new record?
UPDATE
DELETE
SELECT
INSERT
39
A Technician is allowed to backup a web application, but is not allowed to install new software...
A blacklist approach
A defence in depth approach
A least privilege policy
A whitelist approach
40
When implementing an exclusion policy...
Deny
Block
Disallow
Stop
41
Why is it preferable to use a Template mark-up language (TML) that is programming language independent, such as XSLT?
It ensures that all pages are W3C compliant.
It is more likely to generate converting traffic
It enforces the code separation concept of the MVC paradigm
It is more powerful and flexible
42
Which of the following PHP functions strips white spaces from the beginning and end of a string?
trim()
str_replace()
strlen()
strtolower()
43
On mi-linux, in order to use sessions in PHP, which the following must be true?
the web client must have view headers turned on
a set of keys needs to be installed on the web server
session_start(); must be near the start of every page
all hyperlinks need to be changed
44
Define 'Accessibility'
Providing access to a Website, regardless of Web Browser
All of the Suggested Answers
Providing access to a Website for those with disabilities
Providing access to a Website via Tablet, Mobile, PC
45
WSDL provides:
An offline version of a given web service
A machine-readable description of how a web service can be called
An UML diagram of a given web service or application
A tool to design and implement web services
46
YUIDoc is an application that:
generates API documentation from comments in source code
tests your application’s features
verify that your User Interfaces is usable and accessible
optimizes UML diagrams and WSDL documents
47
Which of the following HTML tags/attributes will particularly help a screen reader:
<table> border attribute
<head> tag
<title> tag
<img> alt attribute
48
In programming, a place to store a value in memory is known as:
A function
A variable
An operator
A loop
49
This code will print:
Ben
Nothing
Carrie
Ali
50
In PHP how would you round a number to the nearest 2 decimals?
$rounded_number = round($number);
$rounded_number = 2;
$rounded_number = $rounded_number * 2;
$rounded_number = round($number, 2);
51
With regards to performance of server-side scripting languages, which of the following is true?
Empty choice
Empty choice
Empty choice
Empty choice
52
You want to find out if
"Thread Safety"
is enabled or not on the web server. Which PHP function should you use?
$_SERVER['SERVER_NAME']
phpinfo()
phpversion()
mail()
53
What does SQL stand for?
Structured Query Language, a language to "talk" to a database
Schema Quality Language, a language to create database schemas
Empty choice
Standard Question Language, a language to ask questions to a database
54
Which of the following is a way to make your website content more accessible to web crawlers?
Use a sitemap
Use an Ajax navigation menu
Use more images
Use Flash
55
When fetching a record using the mysqli_fetch_row() function, what is the format of the data?
an associative array
a string variable
an enumerated array
an object
56
A PHP script is executed by which of the following?
A web server
My SQL
A Cookie
The client’s web browser
57
In PHP what is the correct syntax to define a function with 2 parameters?
function $param1, $param2:
function function_name($param1,$param2)
function $param1, function $param2
function($param1, $param2)
58
If an IT system has multiple layers of security control, this is referred to as:
A whitelist approach
A least privilege policy
A defence in depth approach
A blacklist approach
59
Assuming we have a valid database connection open, and that the SQL is a valid query, what would the following PHP do?
the script outputs nothing as the code does not work
the script outputs the number of records in the staff table
the script outputs name and room for every staff
the script outputs the number of fields in the staff table
60
Which SQL command would you use to change a value of an existing record?
INSERT
UPDATE
SELECT
DELETE
61
Which of the following is an inconvenient of Ajax?
It can cause accessibility issues
It is very slow
It affects the page’s layout
It is not W3C compliant
62
Assuming the variable $result contains 20 rows from a MySQL table, what would the following PHP do?
It would output the first three records, 20 times
It would output the first three fields of each record, for 19 rows
It would output every third record
It would output the first three fields of each record, for 20 rows
63
What does the following piece of code do? $number = rand(1,10);
It generates 10 random numbers
It generates 1 random number between 1 and 10
It generates 10 random number between 1 and 10
It declares a variable with a value of 1.10
64
Look at the following HTML:
echo $POST["Surname"];
echo $_GET["Surname"];
echo $Surname;
echo $_POST["Surname"];
65
Which of these statements concerning Arrays is true?
All the elements in an Array must be of the same data type
An Array is limited to a maximum of 1024 elements
All the elements in an Array can be of different data types
An Array cannot hold numbers, other than Integers
66
What is a cookie in the context of web design?
a small piece of text stored on a user's computer by a web browser.
a small piece of text stored on a web server by a web server application.
a value passed in a page's URL.
a Flash animation.
67
Which of the following is a popular PHP template system?
Apache
Smarty
Linux
Zend
68
For the following code:
Empty choice
Empty choice
Empty choice
Empty choice
69
Which of the following new specification aims to replace Ajax?
Fetch
Service Workers
Web Workers
Geolocation
70
A common type of attack against a website is called "Semantic URL attacks". What does it mean?
The attacker tries to hijack a session
The attacker sends a spam email
Empty choice
The attacker changes parameters in the URL
71
Escaping your outputs means that:
You disable on-screen error reporting
You encrypt all user passwords
You protect sensitive pages with a session
You strip special characters off their meaning.
72
Which file do you normally have to edit to implement URL rewriting?
robot.txt
index.html
sitemap.xml
.htaccess
73
.
the script outputs: "It is a nice day, why not walk to work ?"
the script outputs: "Think about it !"
script outputs: "It is a nice day, why not walk to work? Think about it!
the script does not work - there are errors in the code
74
Technical documentation, such as the code, algorithms, interfaces and the APIs, is aimed at the:
Cleaner
End users
Programmers
Managing Director
75
A function can return a value using which of the following statement?
recall
respond
send
return
76
What file format is Google Earth built on?
KML
JSON
XML
UML
77
What will the following piece of code print out on the screen?
The result is 1
The result is 10
The result is 4
The result is 6
78
When filtering inputs, allowing all data except for certain words is referred to as:
A whitelist approach
A defence in depth approach
A least privilege policy
A blacklist approach
79
Why would you use a Captcha?
To verify that a webpage is compliant
To verify that the session is secure
To verify that the current user is human
To block Cross-site scripting attacks
80
Which superglobal array contains information about the server and the execution environment?
$_SERVER
$_SESSION
$_POST
$_GET
81
Which of the following operators would you use to concatenate 2 string variables?
- -
++
#
.
82
In order to pass one or many variables as part of a URL, which of the following symbols is required?
#
?
!
<>
83
.
the script outputs "oranges are orange, oranges are NOT green"
the script outputs nothing
the script outputs "oranges are orange"
the script outputs ", oranges are NOT green"
84
Ajax uses XMLHttpRequest, which is:
A browser API to exchange data between client and server
A PHP extension for performance monitoring
An XML document and its associated schemas
A relational database management system
85
Which attribute of the <FORM> tag do you use to specify the file that is going to handle the form?
method
target
name
action
86
What value should replace "login" in your own PHP code:
dbStudentNumer
OPS$StudentNumber
Your student number
Your MySQL password
87
A sitemap is:
A picture file that represents the map of your website
A word document containing your website's specification
A style sheet that format all your pages
An XML file that contains all the URLs of your website
88
In a typical web browsing experience, which of the following statements is true?
Empty choice
Empty choice
Empty choice
Empty choice
89
.
the 5 times table from 1 to 6
the 6 times table from 1 to 12
the 6 times table from 1 to 5
the 6 times table from 1 to 4
90
Which of the following SQL statements...
SELECT * FROM employee ORDER BY department;
SELECT department 10 employees FROM employee SORT BY department;
SELECT * FROM employee ORDER department DESC;
SELECT employee details FROM employee ORDER BY department;
91
Presenting content to a crawler that is different to that presented to the user's browser is called:
Doorway pages
Keyword Stuffing
Cloaking
Hidden text
92
An attack whereby a user types in client-side code into a form (normally JavaScript) is called:
SQL injection
Cross-site scripting
Spoofed Form Submissions
Semantic URL attacks
93
Given the following:
output the following: 1, 2, 3, 4, 5, 6, 7, 8, 9,
output the following: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
output the following: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
output the following: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
94
What is a Web template system?
Empty choice
A multi-user operating system
Empty choice
Empty choice
95
When filtering inputs, allowing only data that is on the list is referred to as:
A blacklist approach
A least privilege policy
A defence in depth approach
A whitelist approach
96
One of Neilsen's 10 Usability Heuristics for User Interface Design...
complex terminology to appeal to professionals of the subject area
familiar words, phrases, and concepts
system-oriented terms to appeal to IT professionals
lots of abbreviations and acronyms for brevity
97
SELECT name, address FROM student WHERE number LIKE '18%';What is the best description of the above SQL statement?
Empty choice
Retrieves the name and number of all 5CS023 students
Empty choice
Empty choice
98
URL rewriting allows you to:
Rewrite your pages' URL to more user friendly ones
Rewrite the server-side code of your website to be more efficient
Rewrite all your pages' URL in Linux compatible format
Rewrite the content of your web pages in a different languages
99
When should you define a field as being
NOT NULL
:
When the data stored is always unique
When the data stored is always known
When the data stored might contain null values
When the data stored is numeric