C How to Program (8th Edition)
C How to Program (8th Edition)
8th Edition
ISBN: 9780133976892
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 7, Problem 7.10E

a)

Program Plan Intro

To write a single code statement to define the variable lptr to be a pointer to an object of type long.

b)

Program Plan Intro

To write a single code statement toassign the address of value 1to lptr pointer variable.

c)

Program Plan Intro

To write a single code statement to print the value of object pointed by lptr .

d)

Program Plan Intro

To write a single code statement to assign the value of object pointed by the lptrto value 2 variable.

e)

Program Plan Intro

To write a single code statement to print the value of variable, value2.

f)

Program Plan Intro

To write a single code statement to print the address of variable, value1.

g)

Program Plan Intro

To write a single code statement to print the address stored in lptr and to state that the value of lptr is same as of value1 or not.

Blurred answer
Students have asked these similar questions
Declare an integer pointer variable intPointer. Initialize it to point to an int variablenamed someInt.Assign the value 451 to someInt and output (cout) the variable someInt and output (cout)the value pointed to by intPointer.Write an assignment statement that indirectly stores 900 into the value pointed to by intPointer.Output (cout) the value pointed to by intPointer and output (cout) the variable someInt,
1. Declare an integer pointer variable intPointer. Initialize it to point to an int variable named someInt.Assign the value 451 to someInt and output (cout) the variable someInt and output (cout) the value pointed to by intPointer.Write an assignment statement that indirectly stores 900 into the value pointed to by intPointer.Output (cout) the value pointed to by intPointer and output (cout) the variable someInt,2. Declare a pointer variable charArrPointer and initialize it to point to the first elementof a three-element char array named initials. Write assignment statements to store 'A', 'E', and 'W' into the first three elements of the array POINTED to by charArrPointer. Do NOT store any values directly into the array named initials.3. Output (cout) the data in array charArrPointer and the data in array initials. 4. Copy the following code into your program above main: struct NodeType {int num;NodeType* next;};5. Copy the following code into your program after main: NodeType…
A pointer variable cannot be: A Passed to a function as argument. B B Changed within the funcction. C Returned by a function. D Assigned as an integer value. D
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
    Systems Architecture
    Computer Science
    ISBN:9781305080195
    Author:Stephen D. Burd
    Publisher:Cengage Learning
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning