What will be the value of following expressions if j=5
1)(5*++j)%6
2) (5*j++)%6
Answers
Answered by
3
1)(5*6)%6 as it is pre-increment
2)(5*5)%6 as it is post-increment
2)(5*5)%6 as it is post-increment
Answered by
0
Answer:
The correct answer is used in c/c++ programming language.
Explanation:
Pre increment is an operation used for finding the increment of a value before applying to any expression. Here, we prefer the first value which will be used inside the expression.
Syntax is a= ++x;
Post increment is an operation used for increment of value after applying to any expression. Here, we prefer the value to be first and used in the expression.
Syntax is a = x++;
Given that:
The value of following expressions if j=5 is:
1)(5*6)%6 as it is pre-increment
2)(5*5)%6 as it is post-increment
#SPJ3
Similar questions
Science,
8 months ago
English,
1 year ago
CBSE BOARD X,
1 year ago
English,
1 year ago
Science,
1 year ago