C Programming - Arrays - Discussion

Discussion Forum : Arrays - Point Out Correct Statements (Q.No. 2)
2.
Which of the following statements mentioning the name of the array begins DOES NOT yield the base address?
1: When array name is used with the sizeof operator.
2: When array name is operand of the & operator.
3: When array name is passed to scanf() function.
4: When array name is passed to printf() function.
A
A, B
B
B, D
Answer: Option
Explanation:

The statement 1 and 2 does not yield the base address of the array. While the scanf() and printf() yields the base address of the array.

Discussion:
20 comments Page 2 of 2.

Jackman said:   1 decade ago
'&a' ->pointer to an array 'a'
'a' ->shows the base address of an array 'a'

Jasmin said:   1 decade ago
What is exactly the difference b/w base address and address of first element?

Pranita said:   1 decade ago
Can you explain why &a doesn't represent base address?

Pranavi said:   1 decade ago
Please tell me which represents exactly base address?

Manisha said:   9 years ago
I agree @Nirupam.

Answer should be only A.
(1)

Indu said:   1 decade ago
Is &a doesn't represents base address.

Khushi said:   1 decade ago
&a will give the base address?

AKSHAY said:   9 years ago
Well explained @Nirupam.

Tanvi said:   1 decade ago
Nice explanation Adi.

Pavan said:   1 decade ago
Any body explain me?


Post your comments here:

Your comments will be displayed after verification.