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
Explain union.
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What is the use of sizeof () in c?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Explain the priority queues?
Explain what are binary trees?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What is union and structure?
How do we make a global variable accessible across files? Explain the extern keyword?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
what type of questions arrive in interview over c programming?
Explain Function Pointer?
What does c mean?
What is c language in simple words?