Thursday, July 9, 2009

Why do we put an address of operator in a scanf statement in C unlike in printf statement?

This is because while using scanf we store the scanned data from the user directly into the memory location of the variable which is denoted by the %26amp; operator, while in printf we wish to print the value stored in the variable, which is unrelated to memory location.

bouquet

No comments:

Post a Comment