Quiz 7 Solution - int a[2[3 ={1,0,1{0,1,0 for k=0 k<2 k...

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

View Full Document Right Arrow Icon
Name: _____________________________ Quiz Seven Indicate what this program will print out in the window. [10 points] CIS 209 #include <stdio.h> int main() { int k, j, c;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int a[2][3] = {{1,0,1},{0,1,0}}; for( k=0; k<2; k++ ) { c = 0; for( j=0; j<3; j++ ) { if( a[k][j] != 0 ) c++; } printf( "%d\n", c ); } return 0; } 2 1...
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