12th Computer Application Creative Questios English Medium PDF Download
12th Computer Application Creative Questios English Medium PDF Download
Creative questions:
www.Padasalai.Net www.Trb Tnpsc.com
1.Write the output of the following PHP code. (May-2022)
<?php> OUTPUT:
$S=array (11, 333, 7777); Error
foreach ($S as $V)
Print $V “<br>”;
<?>
2. Write the output of the following Program:(Mar-2023)
<? php OUTPUT:
$a=5; $b=10; 75
$c= ($a+$b)*$a;
echo $c;
?>
3. Write the output of the following PHP script (July-2022)
<? php OUTPUT:
et
$x=array (10,20,30); sum=90 Rupees
$y=array (50,60,80);
$z= $y[1]+$x[2];
i.N
print(“sum=”.$z. “Rupees=”);
?>
4. Write the output of the following PHP script. (June-2023)
<? php
la
function welcome ()
{
echo “Welcome to PHP programming!”. “<br>”;
sa
echo “Dear”. “students”. “<br>”;
echo “Give your best in your exams”. “<br>”;
?>
da
OUTPUT:
Welcome to PHP programming!
Dear students
Give your best in your exams
Pa
Expected questions:
1.Write down the output of the following code
<?php OUTPUT:
$a = 5; 1
w.
$b = 2;
$a % = $b;
echo($a);
ww
?>
2.What will be the output for the following
<?php OUTPUT:
While($i< = 5) 1 2 3 4 5
{
echo $i;
$i++
}
?>
3. What is the output of the following code
<?php OUTPUT:
$x = 5; Error
$y = 7;
et
<?php
$n = 10;
if ($n < 5) OUTPUT:
i.N
{
echo “The number is less than 5.”; The number is greater than 5
}
elseif ($n > 5)
{
la
echo “The number is greater than 5.”;
}
else
{
sa
echo “The number is equal to 5.”;
by,
}
da
?>
E.RAJKUMAR. M.C.A., B.Ed,
6. Write a PHP code to print 1 to 10 numbers in ascending order using for loop
for ($i = 1; $i<= 10; $i++)
PG Computer Science
{
echo $i . “<br>”;
Pa
Tenkasi District
}
7.What is the output of the following code snippet? OUTPUT:
$i=2; 2 8122402438
While($i< = 10) 4
w.
{ 6
echo $i. “<br>”; 8
$i+=2; 10
ww
}
8.What will be the output of the PHP code? (Common Second Revision -2022)
<?php OUTPUT:
for ($x = 1; $x<= 5; $x++) 12345
{
echo $x ;
}
?>