in c program '&' is used in 'scanf ' to indicate
Answers
An operator is a symbol which operates on a value or a variable. For example: + is an operator to perform addition. C has wide range of operators to perform various operations
In the C programming language, scanf is a function that reads formatted data from stdin (i.e, the standard input stream, which is usually the keyboard, unless redirected) and then writes the results into the arguments given.
Answer:
In c programming language ' & ' is used in ' scanf' to indicate the address of the variable Or an another way we can say '&' operator is used within 'scanf' when we take a input from user. Now we understand this operator by an Example.
example program :
#include < stdio. h >
void main ( )
{
int a, b, c ;
printf ( " enter the value of a " ) ;
scanf ( " % d " , & a ) ; // here we use & operator to take input from user.
printf ( " enter the value of b " ) ;
scanf ( " % d " , & b ) ; // & operator.
c = a + b ;
printf ( " %d " , c ) ;
}