Inf1120_Intra_2001H_Gr00modJava

Inf1120_Intra_2001H_Gr00modJava - INF1120 Programmation I...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: INF1120 Programmation I Hiver 2001 Examen Intra 10 mars 2001 CONSIGNES Les rglements de lUQAM concernant le plagiat seront strictement appliqus . . Il est important de bien expliquer vos choix sil y a lieu. . Les surveillants ne rpondront aucune question. . Aucun document nest permis sauf une feuille 8,5 x 11 . . La dure de lexamen est de 3 heures, de 14h00 17h00 . Vous pouvez utiliser les versos comme brouillons ou comme espace supplmentaire. IDENTIFICATION PRNOM : ........................................................................................ NOM: ............................................................................................ CODE PERMANENT: ................................................................ SIGNATURE: .............................................................................. GROUPE: ..................................................................................... PROFESSEUR: ............................................................................ #1 _____ /10 #2 _____ /15 #3 _____ /25 #4 _____ /10 #5 _____ /10 #6 _____ /10 #7 _____ /20 TOTAL ______/100 page 2 Question 1 (10 points; 4 , 3 , 4 ) 1.A Que vaut la variable nbre aprs cette boucle ? 1 2 3 4 5 6 7 8 9 10 int i = 0, nbre = 0; while ( i <= 9) { for ( int j = 0; j < 10; j ++) nbre ++; i ++; } System . out . print ( nbre ); ............................................................................................................................................................ ............................................................................................................................................................ ............................................................................................................................................................ 1.B Quel est le problme, ici ? 1 2 3 4 5 6 int i = 0, int nbre = 10; while ( i < 10) nbre *= 10; System . out . println ( nbre ); ............................................................................................................................................................ ............................................................................................................................................................ ............................................................................................................................................................ 1.C Que va afficher le programme suivant ? 1 2 3 4 int nbre = 0; for ( int i = 0; i < 10000000; i ++) nbre ++; page 3 5 6 System . out . println ( "nbre" ); ...............................................................................................................................................................
View Full Document

This document was uploaded on 03/03/2010.

Page1 / 16

Inf1120_Intra_2001H_Gr00modJava - INF1120 Programmation I...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online