1.

Why ‘&’ operator is not used with array names in a scanf statement? 

Answer»

In scanf() statement, the “address of” operator (&) either on the element of the array (e.g marks[i]) or on the variables (e.g &rate) are used. In doing so, the address of this particular array element is passed to the scanf() function, rather then its value; which is what scanf() requires. BUT many times the address of zeroth element (also called as base address) can be passed by just passing the name of the array. 



Discussion

No Comment Found

Related InterviewSolutions