NEW
Font size
S
M
L
XL
WorksheetsWP 16-23
Total questions: 72
Worksheet time: 2hrs 4mins
Name
Class
Date
1.
In PHP _________ is a packet of information sent from the server to client, and then sent back to the server each time it is accessed by the client.
a)
session
b)
profile
c)
database
d)
cookie
2.
In PHP cookies are sent from the server to the client via ________ headers.
a)
Get-Cookie
b)
Set-Cookie
c)
Sent-Cookie
d)
Request-Cookie
3.
To access a cookie received from a client _________ superglobal array is used in PHP.
a)
$_COOKIE
b)
$_REQUESTCOOKIE
c)
$_GETCOOKIE
d)
$_SETCOOKIE
4.
In PHP setcookie() the _____ data string defines the life time.
a)
time
b)
End time
c)
Expire
d)
Last time
5.
In PHP setcookie()the _____ definesdata stored in the file
a)
value
b)
time
c)
Expire
d)
data
6.
In PHP ________ works by creating a unique id (UID) for each visitor and storing variables based on this UID.
a)
session
b)
profile
c)
database
d)
cookie
7.
In PHP to store user data in session _______ array is used.
a)
$_SESSION
b)
SYS_SESSION
c)
$SESSION
d)
$_SESSIONS
8.
To start a PHP session _______ in PHP is used.
a)
session_start()
b)
PHP_session_start()
c)
PHP_start()
d)
start()
9.
Which of the following is used to access session variables in PHP?
a)
session_start()
b)
$_SESSION[]
c)
isset()
d)
start()
10.
In PHP MySqlDatabase can be created by using the ____________ command
a)
create database
b)
use databases
c)
show databases
d)
view databases
11.
To list all databases on the sql server _______ is used.
a)
list databases
b)
use databases
c)
show databases
d)
view databases
12.
In PHP to see all the tables in theMySql database _______ is used.
a)
list tables
b)
use tables
c)
show tables
d)
view tables
13.
In PHP to create a connection object for MYSQL ___________ is used.
a)
mysql_connection
b)
db_connection
c)
db_connect
d)
mysql_connect
14.
To select the MySqldatabase in PHP ________ is used.
a)
mysql_db
b)
select_db
c)
mysql_select_db
d)
mysql_select
15.
To read theMySql table in PHP________ is used.
a)
mysql_array
b)
mysql_fetch_array
c)
mysql_query
d)
mysql_fetch_query
16.
To extract the records from the MySqldatabase table _______ function is used in PHP.
a)
mysql_array
b)
mysql_fetch_array
c)
mysql_query
d)
mysql_fetch_query
17.
MySqlDatabase connection can be closed by using _______ in PHP.
a)
mysql_close
b)
sql_close
c)
db_close
d)
mysql_db_close
18.
In PHP which of the following is used to insert the MySql table?
a)
INSERT TABLE INTO table_name(column1,column2, …) VALUES (value1,value2…)
b)
INSERT INTO TABLE table_name(column1,column2, …) VALUES (value1,value2…)
c)
INSERT INTO table_name(column1,column2, …) VALUES (value1,value2…)
d)
INSERT TABLE table_name(column1,column2, …) VALUES (value1,value2…)
19.
In PHP which of the following is used to update the MySql table?
a)
UPDATE table_name SET column1=value 1,column2=value2, … WHERE condition
b)
UPDATE INTO table_name SET column1=value 1,column2=value2, … WHERE condition
c)
UPDATE INTO table_name column1=value 1,column2=value2, … WHERE condition
d)
UPDATE table_name SET column1=value 1,column2=value2, …
20.
In PHP which of the following is used to delete the MySqlrecords?
a)
DELETE FROM table_name WHERE column_name=value
b)
DELETE FROM TABLE table_name WHERE column_name=
c)
DELETE table_name WHERE column_name=value
d)
DELETE column_name=value FROM table_name
21.
PERL is an acronym for ___________
a)
Practical Extraction and Ruby Language.
b)
PHP Extraction and Ruby Language.
c)
Practical Extraction and Report Language.
d)
PHP Extraction and Report Language.
22.
In PERL Save file with _______ extension.
a)
.perl
b)
.pl
c)
.prl
d)
.pr
23.
The__________ symbol is use for Commenting the statements in PERL.
a)
$
b)
%
c)
*
d)
#
24.
In PERL to refer a single element of an array, you will use ________ sign with the variable name followed by the index of the element in square brackets.
a)
@
b)
#
c)
$
d)
&
25.
The ___________ statement loops as long as its conditional expression is false in PERL.
a)
until
b)
foreach
c)
while
d)
for
26.
Perl enables you to define an exit point anywhere in the loop using a special___________ statement.
a)
first
b)
last
c)
next
d)
goto
27.
To terminate a particular iteration of a loop, use the ______ statement in PERL.
a)
first
b)
last
c)
next
d)
goto
28.
In PERL the ____________ statement enables you to jump to any labeled statement in the program.
a)
first
b)
last
c)
next
d)
goto
29.
(1, 5.3, "hello", 2)
In PERL the above example is called _______
a)
list
b)
scalar
c)
hash
d)
values
30.
In PERL ,what will be the output of the following?
@array = (1, 2, 3);
$scalar = @array;
print $scalar;
a)
1,2,3
b)
3
c)
1
31.
The portion of the array is known as an_________ in PERL
a)
array slice
b)
slice
c)
array partition
d)
partition
32.
The ___________ removes an item from the left hand side of an array in PERL.
a)
shift()
b)
unshift()
c)
push()
d)
pop()
33.
The __________adds an item from the left hand side of an array in PERL.
a)
shift()
b)
unshift()
c)
push()
d)
pop()
34.
The _______ function removes and returns the last character in PERL.
a)
chop()
b)
shift()
c)
remove()
d)
split()
35.
The ________ function can be used on a sequence of unquoted strings to quote all of them in PERL.
a)
qu
b)
qs
c)
qw
d)
qt
36.
Hashes are also called as__________ in PERL.
a)
arrays
b)
associative arrays
c)
indexed arrays
d)
key arrays
37.
In PERL the ________ function is used to search an element in the hash.
a)
search
b)
find
c)
exists
d)
check
38.
In PERL ,what will be the output of the following?
%data = ('John Paul' => 45, 'Lisa' => 30, 'Kumar' => 40); @keys = keys %data; $size = @keys; print $size;
a)
4
b)
3
c)
6
d)
1
39.
In PERL ________ are complex list data, like arrays except they link a key to a value.
a)
scalar
b)
Hashes
c)
integer
d)
float
40.
In PERL the ______ represents the standard error file.
a)
STDERROR
b)
STDERR
c)
STANDARDERR
d)
ERROR
41.
In PERL ____ is used to open file in append mode.
a)
<<file_name
b)
>>file_name
c)
>file_name
d)
<<file_name>>
42.
In PERL ______ is the syntax used to close a file.
a)
close()
b)
close (filevar)
c)
filevar=close()
d)
cls()
43.
In PERL ____ is used to open file in write mode.
a)
<<file_name
b)
>>file_name
c)
>file_name
d)
<<file_name>>
44.
The _______ operator is used to read a line of input in PERL.
a)
>>
b)
()
c)
<>
d)
{}
45.
In PERL the _____ function is used for substring extraction.
a)
substr
b)
strsub
c)
strextract
d)
substrextract
46.
In PERL the _______ function removes the last character from a string and returns that character.
a)
pop
b)
chop
c)
chomp
d)
push
47.
In PERL the _________ removes the last character only if it is a newline.
a)
pop
b)
chop
c)
chomp
d)
push
48.
In PERL the ____ function connects all members in an array with some fixed strings
a)
merge
b)
join
c)
add
d)
connect
49.
In PERL the __________ function returns the formatted string , rather than prints.
a)
sprintf
b)
printf
c)
print
d)
puts
50.
In PERL, CGI stands for_______
a)
Common Graphics Interface
b)
Complicated Gateway Interface
c)
Common Gateway Interface
d)
Complicated Graphics Interface
51.
In PERL CGI scripts the ________ statement forces the programmer to declare all variables as package variables or lexically scoped variables.
a)
use package
b)
use strict
c)
use scope
d)
use variables
52.
Django was introduced by _______.
a)
Adrian Holovaty
b)
Bill Gates
c)
Rasmus Lerdorf
d)
Tim Berners-Lee
53.
Django is written in which language?
a)
PHP
b)
Python
c)
Java
d)
Perl
54.
Django was intially released in _________.
a)
2005 July
b)
2006 July
c)
2005 June
d)
2006 June
55.
Django is a type of __________.
a)
Programming Language
b)
Software
c)
Web framework
d)
Application
56.
The _______ command is used to create virtual environment
a)
virtualenv
b)
virtual
c)
environ
d)
env
57.
Which architectural pattern Django follows?
a)
PHP
b)
MVT
c)
HTML
d)
MVC
58.
What does the architecture of Django consist of ?
a)
Model
b)
View
c)
Templates
d)
All Of the above
59.
The ________ command is used initiate a project of Django.
a)
django
b)
admin
c)
django-admin
d)
django-administrator
60.
Django _______ can be used to graphically implement CRUD
a)
Admin Interface
b)
Pip Interface
c)
Interface
d)
CRUD
61.
The ______ is the user interface,what you see in your browser when you render a website.
a)
Model
b)
View
c)
Templates
d)
Controller
62.
A ________consists of static parts of the desired HTML output as well as some special syntax describing how dynamic content will be inserted.
a)
Model
b)
View
c)
Templates
d)
Controller
63.
The _______contains the URL’s for the current project
a)
urls.py
b)
settings.py
c)
init.py
d)
manage.py
64.
The ______ is going to act as the interface of your data
a)
Model
b)
View
c)
Templates
d)
Controller
65.
ORM stands for ______.
a)
Object Relational Mapper
b)
Object Oriented Mapper
c)
Object Relational Ma
d)
Object Running Mapper
66.
The function ________ from the module django.shortcuts.
a)
redirect()
b)
Response()
c)
Request()
d)
Server
67.
The _________ method is used to create a file input and submit the file to the server.
a)
forms.FileField()
b)
forms.CharField
c)
forms.EmailField
d)
forms.DataField
68.
The _______ library used to import to send Email in Django
a)
smtplib
b)
http
c)
smtp
d)
libhttp
69.
The _______ is an entry-point for the web servers to serve the project you have created.
a)
wsgi.py
b)
urls.py
c)
settings.py
d)
init.py
70.
A _______ is a small file that the server embeds on the user's computer.
a)
Cookie
b)
Session
c)
Server
d)
Cache
71.
The _______ is used to store data on a server rather than the computer of the user.
a)
Cookie
b)
Session
c)
Server
d)
Cache
72.
The ________ Field is used for creating TextInput.
a)
CharField
b)
DateField
c)
ChoiceField
d)
DateField
Reset
