#include <stdio.h>
#include <stdlib.h>
int main()
{
int *a= malloc(sizeof(int)*10);
scanf("%d %d",a,a+1);
if(*a<*(a+1))
{
*a=*(a+1);
}
printf("%d",*a);
return 0;
}
Can I use the same array pointer to input 2 numbers and find largest number among them, as shown in the above code?