C Programming - Arrays - Discussion
Discussion Forum : Arrays - General Questions (Q.No. 3)
3.
In C, if you pass an array as an argument to a function, what actually gets passed?
Answer: Option
Explanation:
The statement 'C' is correct. When we pass an array as a funtion argument, the base address of the array will be passed.
Discussion:
31 comments Page 2 of 4.
Vignesh P said:
1 decade ago
Please answer any one, What is an argument in a array element?
Shikha said:
1 decade ago
Base address is the first element of the memory locations.
Diksha said:
1 decade ago
When we pass the array name of a 2-d array as an argument to a function and store the address in a integer pointer in the function, the compiler shows an error "10 C:\Users\DJ\Documents\devc\pointerarray.cpp cannot convert `int (*) [4]' to `int*' for argument `1' to `void display (int*, int, int) ' ".
Compiler- DEV C.
Compiler- DEV C.
Manisha said:
1 decade ago
Find out the value of array.
Rajab said:
1 decade ago
Write a program that reads values into an array from a file and sorts the data and writes it in a file.
Help me out with this.
Help me out with this.
Tanu said:
1 decade ago
Base address same as first address of array element?
Ganesh said:
1 decade ago
Since arrays name represent its base adress.
Vini said:
1 decade ago
What is meant by first element?
Promila said:
1 decade ago
Base address of the array and array passing by reference are same or different.
Ravneet said:
1 decade ago
@Poonam.
Base address is the address of list element of the array.
If we pass only name of the Array to a function, it basically means that The base address is passed.
Base address is the address of list element of the array.
If we pass only name of the Array to a function, it basically means that The base address is passed.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers