SlideServe
Menu
Préférences
© SlideServe · v2026

LAB#3

ide avatar
8 diapositives · 370 Views · Sep 28, 2012

LAB#3. Pointers. Ex1: What is the output of the following code ?. firstvalue is 10 secondvalue is 20. Ex2: What is the output of the following code ?. firstvalue is 10 secondvalue is 20. Ex3: Pointers and Arrays (Trace). 10, 20, 30, 40, 50,.

LAB#3 - slide 1
01 / 8LAB#3
1 / 17

Télécharger la présentation

LAB#3
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. LAB#3 Pointers

  2. Ex1: What is the output of the following code ? firstvalue is 10 secondvalue is 20

  3. Ex2: What is the output of the following code ? firstvalue is 10 secondvalue is 20

  4. Ex3: Pointers and Arrays (Trace) 10, 20, 30, 40, 50,

  5. Ex6:Write a C++ program that defines array b with 10 integer elements. Then the program should use pointers to reset each element in the array to ZERO.

  6. Ex7: introduce int variables x and y and int* pointer variables p and q. Set x to 2, y to 8, p to the address of x, and q to the address of y. Then print the following information: • The address of x and the value of x. • The value of p and the value of *p. • The address of y and the value of y. • The value of q and the value of *q. • The address of p (not its contents!). • The address of q (not its contents!).