Problem Solving with C++ (9th Edition)
Problem Solving with C++ (9th Edition)
9th Edition
ISBN: 9780133591743
Author: Walter Savitch
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 9.1, Problem 2STE
Program Plan Intro

Pointer in C++:

A pointer is a variable whose value will be another variable’s address. Generally, a pointer variable is declared as follows:

type *var-name;

Here, “type” is the pointer’s base type and “var-name” is the pointer variable name. The asterisk is used to designate a variable as a pointer.

Given code:

The given declaration is as follows.

int* intPtr1, intPtr2;

Blurred answer
Students have asked these similar questions
The following describes the difference between void and NULL pointers: Make proper use of examples to bolster your argument.
Assignment-3 With the help of a C program show how to typecast a void * to an int * . Attach the code and output and upload the file on classroom.
C++ What is the error in the code below?  my_struct_t *bar; /* ... do stuff, including setting bar to point to a defined my_struct_t object ... */ memset(bar, 0, sizeof(bar));
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning