Computer Science, asked by Prajeetsen32, 1 year ago

What will be the value of following expressions if j=5

1)(5*++j)%6
2) (5*j++)%6

Answers

Answered by pinu23
3
1)(5*6)%6 as it is pre-increment
2)(5*5)%6 as it is post-increment
Answered by anusha195sl
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