Which one below declares a function pointer (f) pointing to a function taking an int and a float and returning a double? 

A

double *f (int, float)

B

double (*f) (int, float) 

C

(*double) f (int, float)

D

 double f* (int, float)

উত্তরের বিবরণ

img

উত্তর: double (*f) (int, float)
ব্যাখ্যা: এখানে বন্ধনীর মাধ্যমে বোঝানো হয়েছে যে f একটি পয়েন্টার, যা এমন একটি ফাংশনের দিকে নির্দেশ করে, যার দুটি প্যারামিটার আছে—একটি int ও একটি float, এবং সেটি double টাইপের মান রিটার্ন করে
যদি বন্ধনী না দেওয়া হয় যেমন double *f(int, float), তাহলে সেটি হবে এমন একটি ফাংশন যা double টাইপের পয়েন্টার রিটার্ন করে, কিন্তু এখানে উদ্দেশ্য ছিল ফাংশনের প্রতি পয়েন্টার ঘোষণা করা। তাই সঠিক রূপ হলো double (*f)(int, float)

Unfavorite

0

Updated: 1 day ago

Related MCQ

____________algorithm requires policy.

Created: 1 day ago

A

Supervised learning

B

 Fuzzy logic

C

Deep learning 


D

Reinforcement learning

Unfavorite

0

Updated: 1 day ago

Which of the following runs the fastest?

Created: 13 hours ago

A

O(log n) 

B

O(n) 

C

O(n log n)

D

O(√n)

Unfavorite

0

Updated: 13 hours ago

 If |A| = m, |B| = n, then the number of injective functions A → B (m ≤ n) is:

Created: 1 day ago

A

P(n,m)

B

C(n,m) 

C

nm 

D

m

Unfavorite

0

Updated: 1 day ago

© LXMCQ, Inc. - All Rights Reserved

Developed by WiztecBD