b) Trace the output for the following program. [Note: show the value changes in the memory and your working steps in void funl (int *p, int *q) { int r; printf("\n p = %d, q = %d", *p, *q); r=*p; *p = *q; 1 = b, printf("\nr = %d, p = %d, q = %d", r, *p, *q) ; %3D int fun2 (int s) return s = s + 5; void main () { int varl = 5, var2 = var2 = var2 / 2; printf (" Varl = %d, Var2 = %d", varl++, var2); funl (&varl, & var2); printf("\n Varl = %d, Var2 = %d", var1, var2); printf ("\n Var3 = %d", fun2 (++var3)); 200, var3 = 50; %3! %3D
b) Trace the output for the following program. [Note: show the value changes in the memory and your working steps in void funl (int *p, int *q) { int r; printf("\n p = %d, q = %d", *p, *q); r=*p; *p = *q; 1 = b, printf("\nr = %d, p = %d, q = %d", r, *p, *q) ; %3D int fun2 (int s) return s = s + 5; void main () { int varl = 5, var2 = var2 = var2 / 2; printf (" Varl = %d, Var2 = %d", varl++, var2); funl (&varl, & var2); printf("\n Varl = %d, Var2 = %d", var1, var2); printf ("\n Var3 = %d", fun2 (++var3)); 200, var3 = 50; %3! %3D
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.1: Selection Criteria
Problem 2E
Related questions
Question
i have trouble answering this
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning