EBK C HOW TO PROGRAM
EBK C HOW TO PROGRAM
8th Edition
ISBN: 8220100663833
Author: 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
in C For each of the following, write a single statement that performs the indicated task. Assume that long integer variables value1 and value2 have been defined and that value1 has been initialized to 200000. a) Define the variable lPtr to be a pointer to an object of type long. b) Assign the address of variable value1 to pointer variable lPtr. c) Print the value of the object pointed to by lPtr. d) Assign the value of the object pointed to by lPtr to variable value2. e) Print the value of value2. f) Print the address of value1. g) Print the address stored in lPtr. Is the value printed the same as the address of value1?
(a) Determine whether the following variable declaration is valid int INT; A Valid B Invalid (b) Determine whether the following variable declaration is valid. int *ptr; A  Valid B Invalid (c) Which of the following statement about pointer is TRUE? A. A pointer variable is a variable used tostore an address B.A pointer holds the data, rather thanwhere to find the data C.The unary operator & is used to find anobject's value D.The unary operator * is used to find an object's address
Assuming a char requires one byte, an int requires four bytes, and a pointerrequires four bytes, (a) How much storage does something of type struct studenttake? (assume only the items given) (b) How much storage does the variable pStudenttake? (c) How much storage does ptrs take if it is declared as struct student *ptrs[10] (array of pointers to students)?    C Programming Please!
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