Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
654 views
in Computer by (92.4k points)

Differentiate between : 

(a) Entry and Exit Control loop b

(b) Call by value and Call by reference

(c) If and Switch statement

(d) Actual and Formal parameter

1 Answer

+1 vote
by (81.4k points)
selected by
 
Best answer

(a) Entry controlled loop: Loop condition is checked before the body of the loop is executed (e.g) for and while. Exit controlled loop: Loop condition is checked after the body of the loop is executed once. (e.g) dowhile. 

(b) call by value: The parameters to a function are passed, but changes done to the variable are not reflected back in the original variable. call by reference: In this type of passing parameters to the function, the address of variable is passed. Hence, any changes made inside the function are reflected to the value of original variable respectively. 

(c) If: It is a decision making statement can take any condition for checking. Switch can take only equality condition.

(d) Actual parameter is the variables passed from the calling program.

Formal parameters are the variables present in the function definition.

(eg) int add (int a, int b)

{

cout<<a+b;

}

void main ()

{

cout << add (x,y);

}

Here, x & y are actual parameters. Whereas, a & b are formal parameters.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...