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