Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How can I implement sets or arrays of bits?

987


What is the ANSI C Standard?

1211


What are the different properties of variable number of arguments?

1102


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

1015


Explain what does the format %10.2 mean when included in a printf statement?

1289


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1882


Where register variables are stored in c?

908


What is the difference between declaring a variable and defining a variable?

1185


When should structures be passed by values or by references?

994


Can include files be nested?

1058


What does 1f stand for?

1089


Write a program to print "hello world" without using a semicolon?

1003


Why do we need arrays in c?

1083


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1814


What is the difference between typedef and #define?

991