Multiple choice

Find the output of the following expression. #include<stdio.h> #iinclude<conio.h> void main() { int x=5 , y; y = ++x; printf(%d , y); }

  1. 6

  2. 5

  3. 7

  4. Wrong expression

  5. None of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Increment operator works here, as per the prefix first value is incremented by one then stored in left hand side variable, i.e.,  x will become x+1 due to increment operator. y=x+1:y= 6.