You think you can answer few questions about programing languages? How about very specific questions? The following quizzes are made to test your knowledge. As always, i is just for fun and no data will be stored by sanuja.com. Feel free to report any errors. Currently only the PHP, MySQL, CSS and HTML quizzes are up. Expect to see more before September 2013.
PHP and MySQL Quiz
Congratulations - you have completed PHP and MySQL Quiz.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Question 1 |
A | 1 |
B | 2 |
C | Unlimited |
D | 5 |
Question 2 |
A | There is no output command for the operation hence the script is useless. |
B | The commenting tags /* and */ are in backwards order. |
C | The start and end should have ?php and ? tags |
D | The "php" at the start should be capitalized to "PHP" |
Question 3 |
A | mysql_affected_rows() Hint: Uh... this is the old one! Oops! |
B | mysql():affected_rows() |
C | mysqli():affected_rows() |
D | mysqli_affected_rows() |
Question 4 |
A | Yes, as long as each website have the access to the install. |
B | No, each website will get it's own set of PHP databases and the PHP install must be independent of each other. |
C | Yes, but both websites MUST share the same database files. |
D | No for Windows based servers, but this can be done on a Linux or Unix server. For Windows, each site must have their own install of PHP. |
Question 5 |
A | False, the plugin for PHP will be automatically installed when the client unit access a PHP based site. |
B | False, PHP is a server side processing language with no end user plugins. |
C | True, but ONLY for mobile devices. |
D | True, because PHP requires a plugin much like Flash or Java on the client computer. |
Question 6 |
A | white space |
B | capital letters |
C | mix of simple and capital letters |
D | numbers |
Question 7 |
$LoveJam=fopen("sanuja.txt","r");
A | It opens the file sanuja.text and enters LoveJam as a variable code. |
B | It opens the file sanuja.text in read only mode. |
C | It opens the file sanuja.text and enters LoveJam as a text string. |
D | It opens the file sanuja.text and assign it to variable fopen. |
Question 8 |
A | True |
B | False |
Question 9 |
A | It prints out the program's out come for input of the next. |
B | It is the human-readable information print out. |
C | This is not a valid PHP function. |
D | It is used to pass the information from previous function to the next known as "r". |
Question 10 |
A | False |
B | True |
Question 11 |
A | VisualBasic |
B | Java |
C | ASP.net |
D | C# |
Question 12 |
A | False |
B | True |
Question 13 |
A | MySQL database attacks |
B | source code attacks |
C | force loads |
D | injections |
Question 14 |
A | $ |
B | [...] |
C | {...} |
D | € |
Question 15 |
/*
.A | True |
B | False |
Question 16 |
A | imagesx() |
B | imagesy() |
C | imagesw() |
D | imageswidth() |
Question 17 |
A | MySQL was developed and supported by Oracle Corporation. |
B | MySQL can be installed on Windows, Linux and Unix servers. |
C | MySQL cannot support standard SQL. |
D | MySQL is a free database program. |
E | MySQL can be used on both small and large scale databases. |
Question 18 |
A | No |
B | Yes |
Question 19 |
A | Ruby |
B | C# |
C | HTML |
D | Java |
Question 20 |
A | function.login() |
B | Using a if condition. |
C | check.login() |
D | Using a for or a while loops. |
Question 21 |
$sanuja=mysqli_connect("I","II","III","IV");
A | at II and III |
B | at I and IV |
C | at I and II |
D | at III and IV |
Question 22 |
A | php.exe |
B | FileName.php |
C | _.php |
D | php.ini |
Question 23 |
A | GD Library |
B | PHP-img Library |
C | GB Library |
D | GU Library |
Question 24 |
A | No, it can only be installed on Windows Servers with IIS support. |
B | No, it can be installed on any server, but cannot be installed on non-server units. |
C | No, it can only be installed on Linux servers. |
D | Yes, it can be installed on Unix, Linux, Apple and Windows operating systems. |
Question 25 |
mail(V, W, X, Y, X)
A | At position Y |
B | At position X |
C | At position W |
D | At position V |
E | At position Z |
Question 26 |
A | command() |
B | print() |
C | strings() |
D | str() |
E | echo() |
Question 27 |
$cars=array("Volvo","BMW","Toyota");
echo "I like " . $cars[0] . ", " . $cars[1] . " and " . $cars[2] . ".";
A | array |
B | loop |
C | condition |
D | data set |
Question 28 |
A | Hypertext Preprocessor |
B | Preloaded Hypertext Programming |
C | Processed Hypertext Prone |
D | Preconfigured Hypertext Programming |
Question 29 |
$sanuja=mysqli_connect("I","II","III","IV");
A | username and password |
B | database and password |
C | database and host |
D | host and database |
E | host and username |
Question 30 |
$name = "Sanuja Senanayake";
Is it a valid variable name?
A | No, because you cannot have white space (space) inside a variable name |
B | Yes, but it is a print statement, not a variable. |
C | No, because you cannot use an undefined arbitrary words in variables. PHP won't known what is Sanuja Senanayake. |
D | Yes |
← |
List |
→ |
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 |
End |
CSS and HTML Quiz
Congratulations - you have completed CSS and HTML Quiz.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Question 1 |
A | By using the @import url("file_url_here") in one of the .css files. |
B | By using functions_css("file_url_here") at the top of the .php file. |
C | By using the $css_file("file_url_here') in one of the .css files. |
D | By saving both files with the same name but one of them as .css and the other as .css2 extinctions. |
E | You cannot combine two different style sheets. |
Question 2 |
A | Yes |
B | No |
Question 3 |
A | CSS |
B | JavaScript |
C | MySQL |
D | PHP |
E | HTML |
Question 4 |
A | 3 |
B | 4 |
C | 1 |
D | 2 |
Question 5 |
A | ...a single style sheet can be loaded for all subsequent pages. |
B | ...it can take over heavy loads off of MySQL databases. |
C | ...it can take over some of the php.ini functions. |
D | ...it is a server side programming language. |
Question 6 |
A | & |
B | : |
C | / |
D | % |
E | ? |
Question 7 |
A | False |
B | True |
Question 8 |
A | Hash Tag Markup Language |
B | Hash Text Markup Language |
C | Hyper Text Markup Language |
D | Hyperlinks and Text Markup Language |
Question 9 |
(Without creating a separate style sheet.)
A | .POST_ID .WHAT_EVER_CODE_ELEMENT_TO_BE_MOD {
VARIABLE:ACTION;
} |
B | .WHAT_EVER_CODE_ELEMENT_TO_BE_MOD .POST_ID {
VARIABLE:ACTION;
} |
C | .WHAT_EVER_CODE_ELEMENT_TO_BE_MOD {
VARIABLE:ACTION;
POST_ID
} |
D | .WHAT_EVER_CODE_ELEMENT_TO_BE_MOD {
POST_ID
VARIABLE:ACTION;
} |
Question 10 |
A | wrap:none; |
B | white-space:blank; |
C | text-wrap:black; |
D | white-space:nowrap; |
Question 11 |
A | They are different. The br tag creates a new paragraph while the p tag creates a new line. |
B | They are different. The br tag creates a new line and p tag creates a new paragraph. |
C | They are the same. They move the data to the next line. |
D | They are the same. They create a new paragraph. |
Question 12 |
A | em |
B | ty |
C | ita |
D | br |
Question 13 |
A | They are identical and will behave the same. |
B | The first one is used to control an element name "sanuja". The second one is an invalid code in CSS. |
C | The second one is no longer in use. All current (as of MAY-2013) versions of CSS use "dot" version |
D | First one is used to control all elements with id=sanuja. Second one is used to control a single element with class=sanuja |
Question 14 |
A | Cascading Style Sheets |
B | Casting Style Sheets |
C | Computer Style Sheets |
D | Cheat Style Sheets |
Question 15 |
A | No |
B | Yes |
This is a title heading.
Question 16 |
A | important! |
B | always! |
C | primary! |
D | dominate! |
← |
List |
→ |
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 | End |