Какая программа содержит ошибку?
(Отметьте один правильный вариант ответа.)
Варианты ответа
struct struct_type {int a, b; char ch; };void fun(struct struct_type STRUCT3);int main (void) { struct struct_type struct2 = {2, 3, 'Z' }; fun(struct2); return 0; }void fun(struct struct_type STRUCT3) { printf("\n %c: %d + %d = %d\n", \ STRUCT3.ch, STRUCT3.a, STRUCT3.b, STRUCT3.a + STRUCT3.b);}
struct struct_type { int a, b; char ch;};void fun(struct struct_type parm);int main (void) { struct struct_type arg; arg.a = 1000; fun(arg); return 0;}void fun(struct struct_type parm){ printf("\n %d\n", parm.a);}
struct struct_type { int a, b; char ch; };void fun(struct struct_type *parm);int main (void){ struct struct_type arg,*PTR; PTR = &arg; PTR->a = 999; fun(PTR); return 0;}void fun(struct struct_type *parm){ printf("\n %d\n", parm->a);}
struct struct_type { int a, b; char ch; };void fun(struct struct_type *parm);int main (void){ struct struct_type arg,*PTR; PTR = &arg; PTR->a = 999; fun(PTR); return 0;}void fun(struct struct_type &parm){ printf("\n %d\n", parm->a);} (Верный ответ)