#include <stdio.h>
double *add(double a, double b);
int main (void){
double a=2, b=4;
double *sum = add(a,b);
printf("%f, %f, %f",a,b,*sum);
return 0;
}
double *add(double a, double b){
double sum = a + b;
return ∑
}
Trying to find out whats wrong, it prints out nothing even tho it should, I am currently experimenting with dangling pointers but unsure if im printing it correctly