In this example, I get some big number displayed(in spite of getting an error), what does this number mean physically? Why does this no change everytime I run the program
This means the same as this cout << (*(arc+10)) which means go to the place pointed to by the pointer arc, and count along from there in memory the distance of 10 integers (probably 40 bytes), and then output whatever number is at that memory location.
What number did you put there? You didn't. It could be anything at all.
If that memory location exists, it has a value in it. It will be some value left over from whatever last used that piece of memory, or some random value that was there when the machine started. Can you think of a way to have memory that does physically exist, but has no value?
If that memory physically doesn't exist (or the operating system thinks you shouldn't be reading it), the operating system will put a halt to things.
If that memory location has the number 34 in it, and you're treating it as an int, you'll get the number 34 on the console.
If that memory location has the number 1627456 in it, and you're treating it as an int, you'll get the number 1627456 on the console.
If you're treating it as a char or a float or something else, those numbers will be translated into whatever they represent as a char or a float or whatever.
I asked a lot of ppl round here, but all they could tell is that it "its a garbage value"
But I always wanted to know, what did the value meant physically? Why this no only?
Also I had the same doubt with strings, which you solved by your last post