Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m trying to write a function that returns a struct which i canuse later and t

ID: 3614986 • Letter: I

Question

I'm trying to write a function that returns a struct which i canuse later and this is how i did it and there seems to be somethingwrong could you help
typedef struct{ double x, y, z; }elctron
electron e_gaussian(int n_electron){ electron e_grid[n_electron]; ............... return e_grid; }
void draw_electrons(){ electron e_grid = e_gaussian(n_electrons); ......................; }

typedef struct{ double x, y, z; }elctron
electron e_gaussian(int n_electron){ electron e_grid[n_electron]; ............... return e_grid; }
void draw_electrons(){ electron e_grid = e_gaussian(n_electrons); ......................; }

Explanation / Answer

//here is basic structure of theprogram. #include #include #define n_electron 10 typedef struct { double x, y, z; }electron; electron e_gaussian(int n_elect) { electron e_grid[n_elect]; //............... return e_grid[0]; } void draw_electrons(){ electron e_grid = e_gaussian(n_electron); //......................; } int main() { printf(" "); system("pause"); }