Apuntadores - Universidad de Carabobo, FACYT - computacion
Apuntadores - Universidad de Carabobo, FACYT - computacion
Apuntadores - Universidad de Carabobo, FACYT - computacion
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
PRÁCTICA 3. APUNTADORESUNIVERSIDAD DE CARABOBOFACULTAD EXPERIMENTAL DE CIENCIAS Y TECNOLOGÍADEPARTAMENTO DE COMPUTACIÓNGRUPO DE DESARROLLO DE SOFTWARE Y SISTEMASCS0218 − ALGORITMOS Y PROGRAMACIÓN IIPRÁCTICA 3(APUNTADORES)1. Indique cuáles <strong>de</strong> las siguientes afirmaciones son verda<strong>de</strong>ras y cuáles son falsas. Justifique surespuestas.a) ¿Qué es un apuntador?.b) ¿Cuáles son las operaciones <strong>de</strong>finidas sobre el tipo Apuntador y cómo funcionan?.c) Investigue acerca <strong>de</strong>l uso <strong>de</strong> apuntadores en lenguaje C.d) Investigue acerca <strong>de</strong> la artmética <strong>de</strong> apuntadores en lenguaje C.2. En los siguientes algoritmos indique gráficamente lo que va ocurriendo con cada uno <strong>de</strong> los objetos<strong>de</strong>clarados a medida que se van ejecutando cada una <strong>de</strong> las instrucciones.(a)TipoREF_INT = Apuntador a Entero;(b)TipoREF_REAL = Apuntador a Real;VariableVariableP, Q, R : REF_INT; R1, R2, R3 : REF_REAL;A, B : Entero; X, Y : Real;igual1, igual2 : Booleano;igual1, igual2 : Booleano;ComienzoCrear(P)ComienzoP↑ ← 20; X ← 10.5;A ← P↑ + 5; Y ← 22.3;Q ← βA;R1 ← βX;B ← Q↑ + P↑;R2 ← βY;R ← P;X ← R1↑ + R2↑;P ← βB;Crear(R3);R↑ ← R↑ + P↑; R3↑ ← X;Q↑ ← Q↑ + 5;igual1 ← (R3 = R1);igual1 ← (Q↑ = A); R3↑ ← R2↑ + Y;igual2 ← (P = βB); R1 ← R3;Crear(P);igual2 ← (R1↑ = X);igual1 ← (P = βB);FinFinCS218-Algoritmos y Programación IIEnero, 20061M.G.,L.G.L / mg. lgl