+ 1

pls help with this question.

Type in a code to call the functions pointed by the funcs array. // suppose f1, f2, and f3 are declared void (*funcs[3])() = {f1, f2, f3}; for (int ix = 0; ix < ___; ix++) { _____[ix](); }

12th Mar 2021, 4:48 AM
Princi Mittal
Princi Mittal - avatar
4 Answers
+ 5
Mittal void (*funcs[3])() = { f1, f2, f3}; for (int ix = 0; ix < 3; ix++) { funcs[ix](); } Fill in the blanks are 1) 3 2) funcs Hope this enough to implement the code to call all the three function f1, f2 and f3 in a loop in sequence as specified DHANANJAY
12th Mar 2021, 5:22 AM
DHANANJAY PATEL
DHANANJAY PATEL - avatar
+ 1
Aastha Naik Code written needs correction as below int num = 42; <datatype> * ptr = &num; printf("%d", *((int *)ptr)); <datatype> can be int *ptr OR void *ptr DHANANJAY
18th Jun 2021, 9:36 AM
DHANANJAY PATEL
DHANANJAY PATEL - avatar
0
thanks a lot DHANAJAY.
15th Mar 2021, 5:43 AM
Princi Mittal
Princi Mittal - avatar
0
int num = 42; *ptr = &num; printf("%d", *((int *) ));
18th Jun 2021, 5:17 AM
Aastha Naik