Descargar la presentación
La descarga está en progreso. Por favor, espere
Publicada porMarcelina Almeida Modificado hace 9 años
1
EJERCICOS DE PRACTICA CAPITULO II La lista de ejercicios completos esta desde las páginas 85 hasta la 93 del capítulo 2 del libro del texto.
2
LLENA BLANCOS #include __________ using __________ const string TITLE = “Mr”; int _________() _____ string guest1; string guest2; guest1 ____ TITLE + “. Jones”; guest2 ____ TITLE + “s. Smith”; _____ << “The guests in attendance were” ___ endl; _____ << guest1 << “ and “; _____ << guest2 ____ endl; return ______; ____
3
LLENA BLANCOS - RESPUESTA #include using namespace std; const string TITLE = “Mr”; int main() { string guest1; string guest2; guest1 = TITLE + “. Jones”; guest2 = TITLE + “s. Smith”; cout << “The guests in attendance were” << endl; cout << guest1 << “ and “; cout << guest2 << endl; return 0 ; )
4
INDIQUE SI LOS SIGUIENTES IDENTIFIERS SON VÁLIDOS O INVÁLIDOS Y PORQUE IDENTIFIERVÁLIDOINVÁLIDO a. item#1 b. data c. y d. 3set e. PAY_DAY f. bin-2 g. num5 h. Sq Ft
5
PALABRAS RESERVADAS IDENTIFIERRESERVADADEFINIDO a. char b. sort c. INT d. long e. Float Indique si los siguientes identifiers son palabras reservadas o son definidos por el programador.
6
INDIQUE EL OUTPUT STATEMENTOUTPUT a. cout << “s1 = “ << s1 << “s2 = “ << s2 << endl; b. cout << “Result:” << s1 + s2 << endl; c. cout << “Result: ” << s1 + s2 << endl; d. cout << “Result: ” << s1 << ‘‘ << s2 << endl; Asuma que s1 = “blue” y s2 = “bird” y = espacio en blanco
7
INDIQUE LOS ERRORES DE SYNTAXIS DEL SIGUIENTE CÓDIGO #include <iostream const string FIRST : Martin”; const string MID : “Luther; const string LAST : King int main { string name; character initial; name = Marting + luther + King; initial = MID; LAST = “King Jr.”; cout << ‘Name = ‘ << name << endl; cout << mid cout << endl;
Presentaciones similares
© 2024 SlidePlayer.es Inc.
All rights reserved.