Question

1a) Which of the following statements is true about pointers? a)Pointers contain values as well as...

1a) Which of the following statements is true about pointers?

a)Pointers contain values as well as addresses of variables.

b)Pointers contain address locations of variables.

c)Pointers do not have any address location of their own.

d)Pointers occupy permanent storage locations inside the hard disk.

1b) What is the correct way of declaring a file input object that opens a file "File.txt"?

a) fstream in_file("File.txt");

b) ifsteam in_file.open("File.txt");

c) ifstream in_file("File.txt");

d) in_file.open("File.txt");

2a)  What is the relationship between a base class and a derived class called?

Polymorphism

Encapsulation

Aggregation

Inheritance

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. a. Answer

The correct answer is option b"Pointers contain address location of a variable"

1. b Answer

The correct answer is option b "ifstream in_file.open("File.txt") "

Here in_file is a input file stream variable.

2 a) Answer

The correct answer is "Inheritance"

Inheritance: Inheritance is a relationship between a base class and derived class. In inheritance derived class inherit the properties of base class.

Polymorphism: Polymorphism is defines as an ability of an object to take more than one form.

Encapsulation: Encapsulation is basically wrapping up data and methods into a single unit.

Add a comment
Know the answer?
Add Answer to:
1a) Which of the following statements is true about pointers? a)Pointers contain values as well as...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT