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