✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Consider the following C program:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
double* f(double* q) {
q = malloc(sizeof(double));
*q = log(3.0); // 1.098612
return q;
}
int main(void) {
double x = 9.8;
double* ptr1 = &x;
double* ptr2 = f(ptr1);
printf("%f\n", *ptr2);
free(ptr1);
return 0;
}
Tick all the correct statements.Penalty for wrong ticks.