0% found this document useful (0 votes)
37 views6 pages

Internet Programming II Course Outline

This document is an exam paper for Internet Programming II at Mekdela Amba University for 4th Year IT Summer Students. It includes instructions for the exam, multiple-choice questions, true/false statements, and fill-in-the-blank questions related to PHP and web development. The exam is designed to assess students' understanding of programming concepts and practices.

Uploaded by

Melak Enchalew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views6 pages

Internet Programming II Course Outline

This document is an exam paper for Internet Programming II at Mekdela Amba University for 4th Year IT Summer Students. It includes instructions for the exam, multiple-choice questions, true/false statements, and fill-in-the-blank questions related to PHP and web development. The exam is designed to assess students' understanding of programming concepts and practices.

Uploaded by

Melak Enchalew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MEKDELA AMBA UNIVERSITY

COLLEGE OF COMPUTING AND INFORMATICS

DEPARTMENT OF INFORMATION TECHNOLOGY

Internet Programming II Mid Exam from 25% for 4th Year IT Summer Students

Time allowed: - 1 hr.

Full Name: _________________________ ID Number: _____________________

Instruction

 Do not turn this page until your examiner permits to do so.


 Read the instruction carefully and answer the question according to the instruction.
 Answer only in the provided answer sheet.
 Write your Name and ID No. on the question paper
 Attempt to cheat will be punished without prior notice.

Good luck!!!
Part I: Write 'True' if the statement is correct, and 'False' if the statement is incorrect. (1
point each).
1. A variable declared outside a function has a global scope and can only be accessed outside
a function.
2. GET method can not be used to send binary data, like images or word documents, to the
server.
3. In PHP, all user-defined functions, classes, and keywords are not case-sensitive.
Part II: Choose the best answer from the given alternatives. (1.5 point each)
1. Which one of the following is valid variable declarations in a PHP statement?
A. name; C. $firstnumber;
B. _txt; D. my$Variable
2. Which one of the following statements is wrong about a web page?
A. The content of a static web page can only change if the source code is changed.
B. The content of a dynamic page may change in response to users’ actions.
C. An application that collects data from users through a form and stores it in a database
requires the integration of client & server-side scripts.
D. Source code of a program written in a server-side scripting language is visible on a
client application such as a browser.
3. What will be the output of the following PHP Code?
<?PHP
for($i=1; $i<=10; $i+=2){
if($i==3)
continue;
ECHO($i);}?>
A. 1579 C. 13579
B. 1246810 D. 1245678910
4. What will be the output of the following PHP Code?
<?Php
$x = 6;
$y = --$x;
echo (++$x + --$y);
?>
A. 9 B. 11 C. 10 D. 12

5. Which operator is used to concatenating strings in PHP?


A. . operator C. # operator
B. + operator D. A and B
6. Which of the following is NOT a client-side scripting language used in web development?
A. Java Applets C. ColdFusion
B. Bootstrap D. HTML
7. Which database management system is commonly used in web development?
A. MySQL C. SQLite
B. MongoDB D. Redis
8. Which one of the following function is used to initialize constant in php?
A. Constant() function B. Define() function
C. Echo() function D. Initialize() function
9. Which one of the following is TRUE about server side scripting?
A. It Runs on web browser
B. It Runs on users computer
C. It used for validations and functionalities for user events.
D. It provides more security for data
10. What will be the output of the following PHP Code?
<?Php
$x=5;
$y="10";
echo(($x + $y));
?>
A. 5 C. 15
B. 50 D. Error will be display

Part III: Fill in the appropriate word or phrase in the blank space. (1.5 point each)
1. _____________is a special variable, which can store multiple values in one single variable.
2. The PHP ______________ function returns the data type and value
3. XAMPP stands for__________________________________________________________
Part III: Write the out put (3 points)
1. What will be the output of the following PHP Code? (2.5 points)
<?php
$a = 1;
$b = 5; Write the output here
while ($b > 0) {
$b--;
++$a;
$a += $b;
if ($a % 2=== 0) {
echo($a . " <br> ");
}
} ?>
1|P a g e
E.

2|P a g e

You might also like