CSci 4061 Online Quiz: Self-Assessment Quiz
Question 1
What output does the following program produce?

# include <stdio.h>
void foo (int *, int); 
main ()
{
        int a = 2, b =3;
        printf ("a=%d, b=%d, sum=%d\n",  a, b, a+b);
        foo (&a, b);
        printf ("a=%d b=%d sum=%d\n", a, b, a+b);
}
void foo ( int *a, int b)
{
        *a = 3;
        b++;
}



Select the correct answer:
A:
a=2  b=3 sum=5
a=3  b=4 sum=7

B:
a=2  b=3 sum=5
a=6  b=4 sum=10

C:
a=2  b=3 sum=5
a=3  b=3 sum=6

D:
a=2  b=3 sum=a+b
a=2  b=4 sum=6





Your Cumulative score: 0.00
You have completed 0 out of 10 questions
Your score record:

Quiz-System Author: Anand Tripathi 2013