a) What is the difference between static and instance variable. Explain the differences from different point of view such as time of creation, memory space allocation, accessibility, scope, sharing copy among objects/own variable, etc.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 1TF: Mark the following statements as true or false. The member variables of a class must be of the same...
icon
Related questions
Question

KINDLY FOLLOW THE IMAGE (VISUAL DOT NET)

: a) What is the difference between static and instance variable. Explain the differences from different point of
view such as time of creation, memory space allocation, accessibility, scope, sharing copy among objects/own
variable, etc.
b) If a class has no explicate constructor declaration then default constructor is called. What is the purpose of
default constructor. Give an example.
c) Explain the purpose of "this" keyword. Give an example.
d) What is composition and what is the purpose of using it. Please give an example.
(14)
Transcribed Image Text:: a) What is the difference between static and instance variable. Explain the differences from different point of view such as time of creation, memory space allocation, accessibility, scope, sharing copy among objects/own variable, etc. b) If a class has no explicate constructor declaration then default constructor is called. What is the purpose of default constructor. Give an example. c) Explain the purpose of "this" keyword. Give an example. d) What is composition and what is the purpose of using it. Please give an example. (14)
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr