English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Write the purpose of parameterized Function. - Computer Applications

Advertisements
Advertisements

Question

Write the purpose of parameterized Function.

Answer in Brief

Solution

Values can be passed from one function to another function thru parameters.

The parameter is also called arguments, it is like variables.

The arguments are mentioned after the function name and inside of the parenthesis. There is no limit for sending arguments, just separate them with a comma notation.

The following example has a function with two arguments ($sname and $Strength):

<?php
function School_Name($sname,$Strength) {
    echo $sname.”in Tamilnadu and Student Strength is”.$Strength;
}
School_Name (“Government Higher Secondary School Madurai”,200);
School_Name (“Government Higher Secondary School Trichy”,300);
School_Name (“Government Higher Secondary School Chennai”,250);
School_Name (“Government Higher Secondary School Kanchipuram”,100);
School_Name (“Government Higher Secondary School Tirunelveli”,200);
?>
shaalaa.com
Parameterized Function
  Is there an error in this question or solution?
Chapter 5: PHP Function and Array - Evaluation - PART – III [Page 104]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 12 TN Board
Chapter 5 PHP Function and Array
Evaluation - PART – III | Q 2. | Page 104
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×