#include <stdio.h>
#include <stdlib.h>
int* sum(int* num1,int* num2);
int main(){
int a = 10000;
int b=2000;
int *A = sum(&a, &b);
return 0;
}
int* sum(int* num1,int* num2){
int x = (*num1)+(*num2);
return &x;
\\(^^)its shows that this line is the only problem. (Core dumped).
}
I am learning about pointers thats why its all pointers. :)