--:--









Quiz for Pass by value vs pass by reference

Course: C Language | Subject: Unit 4 | Topic: Functions in C



Logo

Q1: In C, how are arguments passed by default to functions?

Logo

Q2: When passing by value, changes made to the parameter inside the function:

Logo

Q3: Which method allows modifying the original variable in a function?

Logo

Q4: In C, pass by reference is usually implemented using:

Logo

Q5: Which keyword is NOT used for pass by reference in C?

Logo

Q6: What happens if you pass an array to a function in C?

Logo

Q7: Which is more memory efficient for large data sets?

Logo

Q8: If a pointer is passed to a function and modified, what happens to the original variable?

Logo

Q9: Which of the following is an advantage of pass by value?

Logo

Q10: Which statement about pass by reference is true?

Logo

Q11: Passing structures by value can be:

Logo

Q12: To modify a variable from a function, you must pass:

Logo

Q13: In C, which is faster for large arrays?

Logo

Q14: When passing by reference, you should pass:

Logo

Q15: Which operator is used to get the address of a variable?

Logo

Q16: Which operator is used to access value from a pointer?

Logo

Q17: Which of these can be modified in pass by value?

Logo

Q18: Passing pointers to a function is equivalent to:

Logo

Q19: Which is a drawback of pass by reference?

Logo

Q20: In C, strings are passed to functions as:

Are you ready to start test? Set your time limit