You are on page 1of 9
Data deincio Quarta, 29 Mago 2017, 1431 Estado. Texte erisdo Dota de submiso: Quarts, 29 argo 2017, 1531 Tempo gto. hore Pergunita 1 meeensis romain yea ppens Wats he next step in using fle ater he nas been decared withthe follwing Eatement? ostream Selecone ums op repos 2. You se the eb otputing aval tok Youu the feo input avert, dont vanttoanaver ‘Youtes the fle open «You open the fe and aezocte with 3 spec file name Pergunta 2 trois ronedoise2 ¥ Onarererte Conse the folowing piece of code ‘The user nput was: "Cristiane Renaldo 37° Which isthe ouput ofthe cade? ‘Selecione uma opr de respesta 3 Name adage: Crisano/ 0 There eno output the program wilston, showing an err message onthe screen «Name and age Cristiano Ronaldo 32 ‘Loon wantto anne (© Name and age: Cristiano /32 Pergunita 3 menses rman yeaa pens Consider the following piece of code: ‘void showTime(unsigned int h, unsigned int m=0) € Poutanen ech 2c" << sat em {Which ofthe folowing sentences about this code Is TRUE ? Selecione uma opgio de resposta: 2. The ouput wll be: 16 tis nt possbleto call shwrime{16) because tis function has 2 parameters. dont wantto answer he output wil be 1690 The ouput willbe: 1&0 1625 Pergunta 4 tessondds roniactotcoo Destacar pepe Consider the folowing piece of code: ‘char ans; do ccin>> ans; while ‘Complete the while statement to force the userto input either ¥ or N Seletione ums opcdo de resposta: ibe (ans =" || ane! Ny bwhilefans = aan = Ni; while (1 (ans ==" asans: a I dont wantte ansier hie (ans t= [| NI Perguinnta 5 sescnaiss tomato oi Oenaserpermuns ‘To read the name (having more than ane word) and gender (M'or F)) of a person from the keyboard which ofthe folowing preces of code would you choose? Selec ums ops de respost: a. stnngname: char gender cout << "Nama? cine sname: cout <<" Gender (Mt F}?"; on > gender: bb. sting name; char gender cout <= "Name? gatina(cin, name cout << "Gender (MF) "jen >> gender, € string are: char gender cout << "Name? getline(cn,namey, cout <= “Gender (MF? gotine(n, gender: sing name: char gender cout =< "Nama? cin.getline(name cout << “Gender (MF) "cn > gender, €.1 dort want to answer Pergunta 6 —teponaits ronactotaoo py Destacarprpits What is writen tothe screen when the folowing piece of code i executed and the user Input for'radius'is 1? double volume, radius; const double Pl = 3.14; ‘cout << "radius ? cin >> radius; the usor input was 1 Volume = 4/3 * PI" radius * radius * radius; cout << volume << endl; Selecone uma opcéo de resposta: 2.418667 don't wantto answer «volume endl 3nd £403 PI radius radius * radius Pergunta 7 mamas ronsacvin y ocsoseom Whats the ouput the flowing program ? void funes{const vectoreint> iv, vectorcint> v2) { for (eiza_ti=0;1- &v) ( ‘cout <<"; for (size ti=0;1< v.sizeQ; i+) cout << sotw(2) << at) cout <<" y Int main ( vectorcin® v1 ={1,2,3, 4,5) fumed} funet(v1, maa Seecone uma opto de resp ae 133) pir234a0 (23411351 atte 4on123451 Pergunntaa 8 rescondide rontunio1.000 YF Destcer ereunia \Wihic ofthe folowing loops is NOT EQUIVALENT to tho loop below for (inti = 4; 1 <= 10; +4) ‘cout << Seletione uma opedo de respost , bh. fortnei= 1:1 70:44 coun ect ident want answer 4. iio: do ‘ cout

You might also like