Open
Description
it seems like parameters being reassigned inside a function aren't reflected in the visualizer
bug report:
Hello,
In the below program after the ptr is loaded with &x,it should point to x,but the visualizer is not doing that ,but the output is right i.e 21 .Can you please explain me why this is happening ?Is it because of somebug or something else?
#include <stdio.h>
int fun(int ptr[])
{
int x = 21;
// size of a pointer is printed
printf("sizeof(ptr) = %d\n", sizeof(ptr));
// This allowed because ptr is a pointer, not array
ptr = &x;
printf("*ptr = %d ", *ptr);
return 0;
}
int main()
{
int arr[] = {10, 20, 30, 40, 50, 60};
fun(arr);
return 0;
}