Question:
What does the following C declaration mean:
int (*func[5])(float, char);?
निम्नलिखित C घोषणा का क्या अर्थ है:
int (*func[5])(float, char);?
Options:
- An array of 5 pointers to functions that take (float, char) as arguments and return an int
- A function returning a pointer to an array of 5 integers
- An array of 5 functions returning pointers to integers
- A pointer to an array of 5 function pointers returning float
- 5 फंक्शन पॉइंटर्स का एक ऐरे जो (float, char) तर्क लेते हैं और int लौटाते हैं
- एक फंक्शन जो 5 पूर्णांकों के ऐरे का पॉइंटर लौटाता है
- पूर्णांक लौटाने वाले 5 फंक्शनों का ऐरे
- फ्लोट लौटाने वाले 5 फंक्शन पॉइंटर्स के ऐरे का पॉइंटर
Correct Answer: a)
Explanation:
According to C operator precedence and declaration rules:
func[5] is an array of 5 elements; *func[5] means each element is a pointer; (*func[5])(float, char) means they point to functions taking float and char; and returning int.
C ऑपरेटर प्राथमिकता के अनुसार:
func[5] 5 तत्वों का ऐरे है, * इसे फंक्शन पॉइंटर्स का ऐरे बनाता है जो (float, char) लेते हैं और int लौटाते हैं।