C++ PROGRAMMING

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

C++ PROGRAMMING

Post by answerhappygod »

C++ PROGRAMMING
C Programming 1
C Programming 1 (136.33 KiB) Viewed 14 times
Question 7 (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) (k) (1) (m) What is a pointer? What is a dereferencing operator? What is the difference between assignment statements p1=p2; and *p1 = *p2; What is a dangling pointer? What is a dynamic variable? What is the purpose of the new operator? What is the purpose of the delete operator? What is the freestore (also called the heap)? What is the difference between dynamic variables and automatic variables? What is a dynamic array? What is the advantage of using dynamic arrays? What is the relationship between pointers and arrays? Explain what is the difference between int* p1, p2; and (25) typedef int* IntPtr; IntPtr pl, p2; double. (n) For each of the following, write a single C++ statement that performs the identified task. (7) (i) Declare two variables fPtrl and fptr2 to be pointers to objects of type (ii) Create a dynamic variable to which fPtrl points. (iii) If the pointer fptr2 is undefined (i.e. it does not point to any variable), let it point to the same variable that fptr1 points to. (iv) Print the address of the object pointed to by fPtrl. (v) Print the value of the object pointed to by fPtr2. (vi) Release the memory occupied by the dynamic variable to which fPtrl points. (vii) Assign null values to the pointers fPtr1 and fPtr2. 3
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply