--:--









Quiz for Pass by value and pass by reference

Course: C++ Language | Subject: Unit 3 | Topic: Functions and Function Overloading



Logo

Q1: In C++, what does pass by value mean?

Logo

Q2: Which of the following is an example of pass by reference?

Logo

Q3: What is the effect of pass by reference?

Logo

Q4: Which of the following passes arguments by value?

Logo

Q5: What syntax is used to pass by reference in function parameters?

Logo

Q6: What will happen if you modify a parameter passed by value?

Logo

Q7: When passing large objects, which method is more efficient?

Logo

Q8: Which of these is NOT a valid way to pass by reference?

Logo

Q9: What is the role of pointers in pass by reference?

Logo

Q10: Which statement about references in C++ is TRUE?

Logo

Q11: How do you call a function with a reference parameter?

Logo

Q12: What is one disadvantage of pass by reference?

Logo

Q13: Which of these ensures the function does NOT modify the argument passed by reference?

Logo

Q14: What happens if you try to reassign a reference inside the function?

Logo

Q15: Can arrays be passed by reference?

Logo

Q16: Which of these declares a function with a pointer parameter?

Logo

Q17: How does pass by reference affect function return values?

Logo

Q18: What is the syntax to pass by const reference?

Logo

Q19: If a function parameter is declared as "int &a", what does it mean?

Are you ready to start test? Set your time limit