Computer Science, asked by sreeja6312, 1 year ago

in c program '&' is used in 'scanf ' to indicate​

Answers

Answered by mithun06062003
2

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.


sreeja6312: is it AND operation
sreeja6312: is it value of the variable
Answered by franktheruler
1

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 ) ;

}

Similar questions