Quiz 4 Solution

Quiz 4 Solution - int c c = fun1 b printf"c in main...

This preview shows page 1. Sign up to view the full content.

Name: _____________________________ Quiz Four Complete the output that this program will produce in the window below. [10 points] CIS 209 #include <stdio.h> int fun1( int a ) { a = a - 2; printf( "a in fun1 is %d\n", a ); return a; } int fun2( int b ) { b = b + 2; printf( "b in fun2 is %d\n", b ); return b; } int main() { int b = 6;
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int c; c = fun1( b ); printf( "c in main is %d\n", c ); printf( "b in main is %d\n\n", b ); c = fun2( b ); printf( "c in main is %d\n", c ); printf( "b in main is %d\n", b ); return 0; } a in fun1 is 4 c in main is 4 b in main is 6 b in fun2 is 8 c in main is 8 b in main is 6...
View Full Document

This note was uploaded on 08/29/2011 for the course CIS 209 taught by Professor Aren during the Spring '11 term at Kansas State University.

Ask a homework question - tutors are online