INDEX
No Practical Question Date Teacher’s
.
Sign
1. WAP to check the data type of different 27/02/2
variables. [int, float, string, bool, array, 4
null]
2. WAP to demonstrate local, global and 27/02/2
static variables. 4
3. WAP to check the area of 27/02/2
4
1. Rectangle
2. Circle
3. Triangle
4. WAP to swap two numbers using print and 27/02/2
echo. 4
5. WAP to demonstrate integer notation of 27/02/2
decimal, binary, octal and hexadecimal. 4
6. WAP to demonstrate various operators: 11/03/2
arithmetic, increment/decrement, 4
conditional, relational, array, assignment.
7. WAP to create a multidimensional array. 11/03/2
4
8. WAP to create and print an associative 11/03/2
array. 4
9. WAP to create a multidimensional 11/03/2
associative array. 4
10. WAP to print all the values of an array 11/03/2
using a for loop. 4
11. WAP to check if two arrays contain the 11/03/2
same elements. 4
12. WAP to perform various array operations. 11/03/2
4
13. WAP to check whether the input number is 12/03/2
prime or not. 4
14. WAP to check the prime numbers between 12/03/2
1 and 100 using a for loop. 4
15. WAP to calculate the factorial of any 12/03/2
number using a while loop. 4
16 WAP to find the factors of any number 12/03/2
using do-while. 4
17. WAP to generate pyramids: 12/03/2
4
A
AA
AAA
1
12
123
A
AB
ABC
*
**
***
***
**
*
18. WAP using else if ladder to generate the 14/04/2
gradings based on the inputted marks by 4
the user:
>=90: A
>=75 & <=89: B
>=60 & <=74: C
>=50 & <=59: D
<=49: E
19. WAP to demonstrate PHPINFO function 14/04/2
in environment variables : 4
INFO_CONFIGURATION
INFO_MODULE
INFO_ENVIRONMENT
INFO_VARIABLE
INFO_ALL
20. Create an associative array using countries 14/03/2
as keys, states as values and transform it 4
into a 2-d array. Display the data as a
table.[html table tag]
21. WAP to explain how we can embed the 14/03/2
php in the html code with suitable 4
comments.
22. WAP to print fibonacci series for a user 14/03/2
defined number. 4
23. Write a menu driven calculator program 14/03/2
which performs +,-,*,/ based on the user's 4
choice using switch case.
1. Write a program to check the data
type of different variables. [int, float,
string, bool, array, null]
Input:
Output:
2. Write a program to demonstrate
local, global and static variables.
Input:
Output:
3. Write a program to check the area
of
i. Rectangle
ii. Circle
iii. Triangle
Input:
Output:
4. Write a program to swap two
numbers using print and echo.
Input:
Output:
5. Write a program to demonstrate
integer notation of decimal, binary,
octal and hexadecimal.
Input:
Output:
6. WAP to demonstrate various
operators: arithmetic,
increment/decrement, conditional,
relational, array, assignment.
Input:
Output:
7. WAP to create a multidimensional
array.
Input:
Output:
8. WAP to create and print an
associative array.
Input:
Output:
9. WAP to create a multidimensional
associative array.
Input:
Output:
10. WAP to print all the values of an
array using a for loop.
Input:
Output:
11. WAP to check if two arrays contain
the same elements.
Input:
Ouput:
12. WAP to perform various array
operations.
Input:
Output:
13. WAP to check whether the input
number is prime or not.
Input:
Output:
14. WAP to check the prime numbers
between 1 and 100 using a for loop.
Input:
Output:
15. WAP to calculate the factorial of any
number using a while loop.
Input:
Output:
16. WAP to find the factors of any
number using do-while.
Input:
Output:
17. WAP to generate pyramids:
A
AA
AAA
Input:
Output:
1
12
123
Input:
Output:
A
AB
ABC
Input:
Output:
*
**
***
Input:
Output:
***
**
*
Input:
Output:
18. WAP using else if ladder to generate
the gradings based on the inputted marks
by the user:
>=90: A
>=75 & <=89: B
>=60 & <=74: C
>=50 & <=59: D
<=49: E
Input:
Output:
19. WAP to demonstrate PHPINFO
function in environment variables :
INFO_CONFIGURATION
INFO_MODULE
INFO_ENVIRONMENT
INFO_VARIABLE
INFO_ALL
Input:
Output:
20. Create
an associative array using
countries as keys, states as values and
transform it into a 2-d array. Display
the data as a table.[html table tag]
Input:
Output:
21. WAP to explain how we can embed the
php in the html code with suitable
comments.
Input:
Output:
22. WAP to print fibonacci series for a user
defined number.
Input:
Output:
23. Writea menu driven calculator
program which performs +,-,*,/ based
on the user's choice using switch case.
Input:
Output: