Computer Science, asked by yaswanthp009, 1 month ago

7) What is the output of this statement "printf("%d", (a++))"?
a. The value of (a + 1)
b. The current value of a
C. Error message
d. Garbage​

Answers

Answered by themakhack
3

Answer:

b is correct answer

Explanation:

answer b is correct

Answered by adventureisland
2

Answer :

b. The current value of a

Explanation :

  • The increment (++) operator is a unique unary operator in C. These operators add one to the value of a variable. Only variables can be utilized with increment operators. Increment Operators are the unary operators used to increment or add 1 to the operand value. They can't be used with expressions or constants.
  • Increment operators are used to increasing the value by one while decrement works opposite increment.

Program :

#include <stdio.h>

int main()

{

   int a=1;

   printf("%d",(a++));    

   return 0;

}

Output :

  1

Similar questions