Suppose u,v=5,10,before the assignment. What are the values of u and v after the sequence of assignments?u : = v + 10 , v : = u + 10
Answers
Answered by
3
Answer:
u=20
v=30
Explanation:
after the first assignment
u=v+10
since v=10
u=10+10
now u=20
second assignment
v=u+10
u=20
hence v=30
Answered by
1
Answer:
u=20, v=30
Explanation:
Given u=5 and v=10 before assignment.
on putting the values in equation it becomes
u=v+10
u=10+10
u=20 after assignment
Since in procedural language value gets changed after applying operations and attains its value as initial value. So,
v=u+10
v=20+10
v=30 after assignment.
Similar questions