answersLogoWhite

0

Yes, passing an array name to a pointer assigns the first memory location of the array to the pointer variable. An array name is the same as a pointer to the first location of the array, with the exception that an array name is a r-value, while a pointer is an l-value.

User Avatar

Wiki User

13y ago

Still curious? Ask our experts.

Chat with our AI personalities

JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
ReneRene
Change my mind. I dare you.
Chat with Rene

Add your answer:

Earn +20 pts
Q: Passing an array name to a pointer assigns the first memory location of the array to the pointer variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is poiner value in c?

In c a pointer is a variable that points to or references a memory location in which data is stored. Each memory cell in the computer has an address that can be used to access that location so a pointer variable points to a memory location we can access and change the contents of this memory location via the pointer. Pointer declaration A pointer is a variable that contains the memory location of another variable. The syntax is as shown below. You start by specifying the type of data stored in the location identified by the pointer. The asterisk tells the compiler that you are creating a pointer variable. Finally you give the name of the variable. type * variable name Example: int *ptr; float *string;


How do pointer work in c program?

Pointer can be defined as variable that is used to store memory address , usually the location another variable in memory. Pointers provide a means through which memory location of a variable can be directly accessed.


Which is the syntax used for passing a structure member as an argument to a function?

You can pass the address by using '&' with the pointer variable, while passing actual arguments. In formal arguments '*' is used in the place of '&'. To pass the address of a pointer variable a double pointer variable should be used .


What is a use of dereferencing operator?

A pointer variable contains the address to some memory location. "Dereferencing" the pointer means getting the value stored at that memory location.


What always contains a pointer variable?

pointer variable in c contains the address or the location of the other variable. eg- if a=2 and address of a is 2345. b=&a then b is a pointer which contains 2345 which is the address of a. *b gives value of that is 2.