0% found this document useful (0 votes)
25 views2 pages

Week012 Lab11 PointersAndReferences1 Edited

Uploaded by

Thia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Week012 Lab11 PointersAndReferences1 Edited

Uploaded by

Thia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Course

CS201
Code

Description Computer Programming 1


Title
Laborator
of
y Exercise 011 Pointer Revolution
Activit
No.
y
Page 1 of 2
LABORATORY EXERCISE
In this activity, you will be given a series of problems that will challenge your logical
understanding of C++ covered by the modules, and not. For each problem, you are
expected to create a project and write a working solution depending on the
requirements of the problem.

Objective/s:
At the end of this activity, the students are expected to be able to:
 discuss the implications of the given problems
 declare pointer variables for a primitive data type, as well as an array
 display the values and logical addresses of these variables based on the
requirement

Material/s Needed:
Visual Studio Code
MinGW

Procedure:
1. Make sure you have a running version of the “Hello World” application shown in
Module 004. If not, review the steps to setup your Work Environment.
2. There will be a series of problems you are required to code. For each, you need to
provide C++ codes for the actual solution.
3. Keep the project files for record as they may be requested by the instructor.

Questions:
1. Write a program that will display the value and logical address of an integer
variable with an initial value of 900.
2. Write a program that will display the value and logical address of an uninitialized
character array with size ten (10) and a pointer pointing to the array. (Hint: you
may need to perform some casting.)
3. Write a program that will display the value and logical address of an uninitialized
float array with size twenty (20) and a reference pointing to the array.
4. What can you conclude from this activity?

1
Course
CS201
Code

Description Computer Programming 1


Title
Laborator
of
y Exercise 011 Pointer Revolution
Activit
No.
y
Page 2 of 2
LABORATORY EXERCISE
INSTRUCTIONS FOR THE STUDENTS:
The filename of your lab activity should be:
“<Last Name><First Name>-LaboratoryExercise0<XX>”

Provide screenshots of your VS codes and program output copied to a Word file.
Upload the Word file to the link provided for the activity in the LMS.

You might also like