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