?
What happens if the following program is executed in C and C++?
What happens if the following program is executed in C and C++?
#include <stdio.h>
int main(void)
{
const int j = 20;
int *ptr = &j;
printf("*ptr: %d\n", *ptr);
return 0;
}
#include <stdio.h>
int main(void)
{
const int j = 20;
int *ptr = &j;
printf("*ptr: %d\n", *ptr);
return 0;
}
Join the Discussion
Login to post a comment or share your explanation.
Login