What is the real difference between arrays and pointers?
Answer Posted / jaroosh
Arrays are simply pointers THAT CANNOT be reassigned, ie,
constant pointers to some memory locations. They do not
"magically preserve" any information about array size or
whatever that some suggest, they are just a type of constant
pointers, nothing more.
For example , the following :
int a[] = {1,23};
a++;
will throw a compiler error, something like : a is not an
Lvalue, which means that you cannot assign or change the
value of a.
| Is This Answer Correct ? | 64 Yes | 14 No |
Post New Answer View All Answers
Subtract Two Number Without Using Subtraction Operator
What is strcmp in c?
what do u mean by Direct access files? then can u explain about Direct Access Files?
I need testPalindrome and removeSpace
#include
Explain the binary height balanced tree?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
Are bit fields portable?
What is the use of ?
How can I find out the size of a file, prior to reading it in?
In c language can we compile a program without main() function?
Why does notstrcat(string, "!");Work?
can we have joblib in a proc ?
What does the error 'Null Pointer Assignment' mean and what causes this error?
What is the correct declaration of main?
What is console in c language?