--:--









Quiz for Pointers to functions

Course: C Language | Subject: Unit 6 | Topic: Pointers



Logo

Q1: What is a pointer to a function in C?

Logo

Q2: What is the correct syntax to declare a pointer to a function returning int and taking two ints?

Logo

Q3: Which operator is used to get the address of a function?

Logo

Q4: How do you call a function using its pointer?

Logo

Q5: Function pointers are often used for?

Logo

Q6: Which of these is a correct declaration of a function pointer to a void function with no parameters?

Logo

Q7: Can a function pointer be NULL?

Logo

Q8: Which header defines qsort that uses a function pointer as a comparator?

Logo

Q9: What is passed to qsort as its fourth parameter?

Logo

Q10: Can function pointers point to overloaded functions in C?

Logo

Q11: Which function type can a function pointer point to?

Logo

Q12: What happens if you call a NULL function pointer?

Logo

Q13: Can you store a function’s address without using & operator?

Logo

Q14: Which is a valid function pointer initialization?

Logo

Q15: Can you pass a function pointer as an argument to another function?

Logo

Q16: Which is true about function pointers and arrays of function pointers?

Logo

Q17: What is the return type of a function pointer?

Logo

Q18: Which of these is a correct way to typedef a function pointer?

Logo

Q19: What is the size of a function pointer in C?

Logo

Q20: Can a function pointer point to main function?

Are you ready to start test? Set your time limit