--:--









Quiz for Assignment and increment/decrement operators

Course: C Language | Subject: Unit 2 | Topic: Operators and Expressions



Logo

Q1: Which operator is used for assignment in C?

Logo

Q2: What will be the value of x after: int x=5; x += 3;

Logo

Q3: Which is the correct syntax for pre-increment in C?

Logo

Q4: Which is the correct syntax for post-decrement in C?

Logo

Q5: If x=10; y=++x; what is the value of y?

Logo

Q6: If x=10; y=x++; what is the value of y?

Logo

Q7: Which operator decreases a variable by 1 before using it?

Logo

Q8: What will be the output of: int x=5; x*=2;

Logo

Q9: Which is a compound assignment operator?

Logo

Q10: If int x=4; x-=1; what is x?

Logo

Q11: What will int x=3; x%=2; result in?

Logo

Q12: Which operator is used for division assignment?

Logo

Q13: Which operator increases a variable by 1 after using it?

Logo

Q14: If int a=5; a/=2; what is a?

Logo

Q15: If int a=5; b=a++ + ++a; what is b?

Logo

Q16: If int a=3; b=++a + a++; what is b?

Logo

Q17: Which operator adds and assigns in one step?

Logo

Q18: Which operator subtracts and assigns in one step?

Logo

Q19: If int x=7; x++; ++x; what is x?

Logo

Q20: Which operator is used to assign the remainder after division?

Are you ready to start test? Set your time limit