hello guys, I have this code:
My question is: isn't that supposed to print out 30 ? (because 30 > 10) , but when I run it , it prints out 10.Code:#include <stdlib.h> #include <stdio.h> int *integer(int *a, int *p); int main(){ int k = 5; int *p = &k; int n = 10; int m = 30; p = (&m, &n); printf("p is: %d, k is : %d \n", *p, k); } int *integer(int *a, int *p){ if(*a > *p ){ return a; } else { return p; } }
Thanks guys