and awd vo (9 points) in text (including it has bug a file a nue of characters H
ID: 3571639 • Letter: A
Question
and awd vo (9 points) in text (including it has bug a file a nue of characters However, Part C git read all the ope 2: below attempts in vector of them a and other characters) rsi special the while never char t std: ector unsigned its File open file) unsigned char cRead EOF) while ((cRead -the File et. (y) the chars push back cRead which the following explains why the while terminates? seleer tion in the file. of best never advance the read been A You must call seekg you call get in order to should have of B. The file not after binary flag and it variable instead an was opened with the to an int-type loop. c The value retumed get be assigned to EoF in the while by should D You should use equals 0 instead of to compare 224 pts) Assume that Dog is class. It has a member named bark takes no arguments consider the following line of c++ code, which appears in a that function: Dog fido code? Select all that apply. 24u Which of the following statements are true about this line of the heap A. The object that is created by this definitely created on located. B. This line calls the o constructor in class Dog is c me value of fido isthe memory address where Dog object Write a statement that will call the function bark on the object created in the above line of codeExplanation / Answer
2.1). C. The value returned by get() should be assigned to an int variable instead of char variable
get() returns an integer value.here the retuned value is assigned to an char variable.So EOF returns Integer 1 but it is assigned to char variable and there arises type comparability issue and makes the loop unterminated
2.2) ii) fido.bark();
Since fido is an object created to the dog class, a member is called using period operator".". So fido as an object calls bark() method as mentioned above
iii)walk(fido);
Since walk is a non member function and it already has the declaration which included a reference to dog object it can be implemented using dog object as shown above
iv)C.
fido is same as d
v)B. Yes but d would not be allowed to modify......
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.