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
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.
1a) Which of the following statements is true about pointers? a)Pointers contain values as well as...
1. (TCO 7) Which of the following statements are true? (Points : 5) Interfaces contain one and only one implemented method, a constructor. Interfaces are defined inside an abstract class. All methods defined in an interface must be implemented when used by another class. A true object-oriented design must contain as least one interface. Question 2. 2. (TCO 7) In an object-oriented program, methods with no implementation might be found in an _____ and/or a(n) ______....
Multiple Choice Multiple Choice Section 4.1 Pointers and Dynamic Memory Consider the following statements: int *p; int i; int k; i = 42; k = i; p = &i; After these statements, which of the following statements will change the value of i to 75? A. k = 75; B. *k = 75; C. p = 75; D. *p = 75; E. Two or more of the answers will change i to 75. Consider the following statements: int i =...
These are my answere to the following questions: are they right? 1. B 2. T 3. T 4. T 5. F 6. T 7. A 8. D 9. E 10. B 11. B 12. A 13. A 14. D 15. C 16. D 17. T 18. C 19. T 20. T 21. T 22. A 23. T 24. D 25. B 26. A 27. A 28. A 29. T 30. C 31. D 32. A 33. T 34. F 35....