Hey everyone,

I've written a program for class but am not sure what the values of a and b are after the code fragment is executed. Anyone that can help me out?

int a = 16;
int b = 45;
bob (a, &b);

void bob(int x; int *py)
{
int temp
temp = x;
x = *py;
*py = 56;
}

Is that a tricky question? Why don't you run it and find out?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.