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