Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4,6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 91 pages
Exam (elaborations)

ICT3612 EXAM PACK 2027 {DETAILED QUESTIONS AND ANSWERS }

Document preview thumbnail
Preview 1 out of 91 pages

ICT3612 EXAM PACK 2027 {DETAILED QUESTIONS AND ANSWERS }

Content preview

Mastervincent



HRM3706 SUMMARISED NOTES




ICT3612 EXAM
PACK



FOR ASSISTANCE CONTACT





,Question 1
Which one of the following is the right way of defining a function in PHP?


1. function functionName(parameters) { function body }
2. function { function body }
3. data type functionName(parameters) { function body }
4. functionName(parameters) { function body }
Question 2
What output will the following PHP function produce?

<?php function calc($price, $tax
= ’’)
{
$total = $price + ($price * $tax);
echo "$total";
}
calc(42);
?>
1. 0
2. 42
3. 84
4. error




1


Downloaded by Vincent kyalo

()

, lOMoAR cPSD| 56105791




ICT3612/102/1/2018



Question 3
Which of the following are valid function names?


i. function()
ii. €()
iii. .function()
iv. $function()

1. only ii)
2. none of the mentioned
3. all of the mentioned
4. only i)

Question 4
What output will the following function produce?

<?php
function b()
{
echo "b is executed";
} function a() {
b(); echo "a is
executed"; b();
} a();
?>


1. b is executedb is executedb is executed
2. b is executeda is executedb is executed
3. b is executeda is executed
4. a is executed

Question 5
What output will the following function produce?

<?php
$op2 = "blabla";
function foo($op1)
{ echo
$op1;
echo $op2; }
foo("hello"); ?>



2


Downloaded by Vincent kyalo ()

, lOMoAR cPSD| 56105791




1. Hello
2. Helloblabla
3. Error
4. helloblablablabla


Question 6
Which one of the following PHP functions can be used to build a function that accepts any
number of arguments?

1. get_argv()
2. get_argc()
3. func_get_argv()
4. func_get_argc()


Question 7
What output will the following PHP code produce?

<?php function
addFive($num)
{
$num += 5;
}
function addSix(&$num)
{
$num += 6;
}
$orignum = 10; addFive(
$orignum );
echo "Original Value is $orignum<br />"; addSix(
$orignum );
echo "Original Value is $orignum<br />";
?>


1. Original Value is 15
Original Value is 21 2.
Original Value is 21
Original Value is 15 3.
Original Value is 10
Original Value is 16 4.
Original Value is 10
Original Value is 15



Question 8
3


Downloaded by Vincent kyalo
()

Document information

Uploaded on
May 17, 2026
Number of pages
91
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$3.11

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
MasterVincent
4.1
(416)
Sold
2845
Followers
456
Items
1950
Last sold
2 days ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions