I have following codes below. However, it is hard for me to determine lifetime and scope of x and *px. I do know the concepts of those terms, though. Should x and *px considered as local variable because it is not declared outside main function or global because it is declared at the start and goes to the end anyway? Confused about static and automatic as well for x and px as well.....
#include <stdio.h>
int main(void)
{
double x=3.14, *px = &x;
printf("ADDR:%p\n", &x);
printf("ADDR:%p\n", &px);
return 0;
}