answersLogoWhite

0


Best Answer

the address of variable (pointer) that contains array

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

Any of these: arr, &arr, &arr[0]

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the base address of an array in c program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

C program for storage representation of 2-D array?

Wright a 'C' program for storage representation of 2-D array.


What happen when a c program passes an array as a function argument?

When an array name is passed as a function argument, the address of the first element is passed to the function. In a way, this is implicit call by reference. The receiving function can treat that address as a pointer, or as an array name, and it can manipulate the actual calling argument if desired.


How do you write a C Program to fill up an Integer Array?

Reference:cprogramming-bd.com/c_page1.aspx# array programming


Does mentioning the array name gives the base address in all the contexts?

Mentioning the array name in C or C++ gives the base address in all contexts except one. Syntactically, the compiler treats the array name as a pointer to the first element. You can reference elements using array syntax, a[n], or using pointer syntax, *(a+n), and you can even mix the usages within an expression. When you pass an array name as a function argument, you are passing the "value of the pointer", which means that you are implicitly passing the array by reference, even though all parameters in functions are "call by value". There is, however, one very important distinction. While an array name is referentially the same as a pointer, it is not a pointer in that it does not occupy program referential space in the process. This means that, while you can change the value of a pointer, and thus the address to which it points, you can not change the value of an array name. This distinction is what we call R-Value (array or pointer) as opposed to L-Value (pointer only), i.e. can the object appear on the left sign of an assignment operator.


Why and is not required for an array in scanf in c?

The name of the array means the address of the first element, so 'arr==&arr[0]'

Related questions

C program for storage representation of 2-D array?

Wright a 'C' program for storage representation of 2-D array.


How do you use in array?

cod a program student degree array in c language


What happen when a c program passes an array as a function argument?

When an array name is passed as a function argument, the address of the first element is passed to the function. In a way, this is implicit call by reference. The receiving function can treat that address as a pointer, or as an array name, and it can manipulate the actual calling argument if desired.


Write a program to find out the address of an element in an array?

== Java does not allow reference to memory locations. == In C: for (i=0; i<n; ++i) printf ("a[%d] is at %p\n", i, &a[i]);


How do you use in?

cod a program student degree array in c language


How do you write a C Program to fill up an Integer Array?

Reference:cprogramming-bd.com/c_page1.aspx# array programming


Does mentioning the array name gives the base address in all the contexts?

Mentioning the array name in C or C++ gives the base address in all contexts except one. Syntactically, the compiler treats the array name as a pointer to the first element. You can reference elements using array syntax, a[n], or using pointer syntax, *(a+n), and you can even mix the usages within an expression. When you pass an array name as a function argument, you are passing the "value of the pointer", which means that you are implicitly passing the array by reference, even though all parameters in functions are "call by value". There is, however, one very important distinction. While an array name is referentially the same as a pointer, it is not a pointer in that it does not occupy program referential space in the process. This means that, while you can change the value of a pointer, and thus the address to which it points, you can not change the value of an array name. This distinction is what we call R-Value (array or pointer) as opposed to L-Value (pointer only), i.e. can the object appear on the left sign of an assignment operator.


Array is value type or reference type in c?

An array always stores the values in its different shells. Whenever the shell position or number or address is mentioned it means the address of the required value is mentioned. then the value of the mentioned address is fetched. So, array is a reference type in c language.


Why and is not required for an array in scanf in c?

The name of the array means the address of the first element, so 'arr==&arr[0]'


Can you give an example of array using character variable in c program?

the example of array over charcter variables is char ["string"]


Array implementation of priority queue example program in c plus plus?

yes


How do you write a program in C to find and display the sum of each row and column of a 2 dimensional array of type float?

array type