Constants and addresses

PHOTO EMBED

Thu Apr 11 2024 08:02:17 GMT+0000 (Coordinated Universal Time)

Saved by @HTPrince

#include<stdio.h>
#include<stdlib.h>
#define PI 3.14

int main(){

const int x=5;
double y=3.0;

y=PI;

printf("x=%d\n",x);
printf("y=%lf\n",y);

printf("the address of y in memory is:%p",&y);


return 0;
}
content_copyCOPY