Computer Science, asked by avantika70, 11 months ago

In C program '&' is used in 'scanf ' statement to indicate ?
a) AND operation
b) Memory location
c) value of the variable
d) value at the memory location ​

Answers

Answered by lovingheart
5

Answer:

(b) Memory location is the right answer.

Explanation:

“&” ampersand symbol here indicates that it is a memory location. The value entered by the user in the command prompt is stored in the memory location. This memory location is being pointed by a variable.

Whenever the variable is used or accessed, the value from the memory is fetched. The same ampersand behaves differently when we use it in terms of pointers. The syntax for scanf is scanf(“%type1, %type2,….., %typen, &var1, &var2,….,&varn)

Where type represent integer (%d), float(%f), etc and var 1,2,3… represents variable.

Answered by smartbrainz
0

In C program '&' is used in 'scanf ' statement to indicate Memory location

Option (b)

Explanation:

  • In the 'C programming language', scanf is a function that reads formatted data from 'stdin' (i.e., the default input channel, which is typically the keyboard, unless redirected) and then writes the results to the given arguments.
  • Ampersand (&) is used before variable name in scanf() statement. If you have a variable in your program using & before variable will give you its address in the memory. It's just like a pointer used to point to a variable.

To know more

The memory address of the last location of an 8k byte memory chip is ffffh find the starting address

https://brainly.in/question/3098665

When deallocating a memory location pointed to by a pointer?

https://brainly.in/question/7341014

Similar questions