Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

These are some questions from a final exam study guide can you help to so I can

ID: 3772181 • Letter: T

Question

These are some questions from a final exam study guide can you help to so I can check my answers.

1. Any mathematical operations that can be performed on regular C++ variables can be performed on structure members.

2. Structure variables may be passed as arguments to functions.

3. The structure pointer operator is used to dereference a pointer to a structure, not a pointer that is a member of a structure.

4. A function cannot modify the members of a structure.

5. If a function is legally prototyped to return an integer value, it can return a structure member that is an integer data type.

6. It is possible to output the contents of all members of a structure variable using a cout << statement followed by the name of the structure variable.

7. It is possible for a structure variable to be a member of another structure variable.

8. It is possible for a structure to contain as a member a pointer to its own structure type.

9. The names of the enumerators in an enumerated data type must be enclosed in quotation marks.

10. You cannot directly assign an integer value to an enum variable.

11. You cannot directly assign an enumerator to an int variable.

12. Look at the following structure declaration.

struct Circle

{

   double centerX;

   double centerY;

   double radius;

};

Assume that circle1 and circle2 are variables of the Circle type, and their members have been initialized. Is it true or false that the following if statement correctly determines whether the two variables’ members contain the same data:

if (circle1 == circle2)         

13. A test using the isupper function will return false if the argument is an uppercase character.

14. The isdigit function will return a true if its argument is a digit between 0 and 9.

15. When using the strcat function, you must be careful not to overwrite the bounds of an array.

16. The C++ compiler performs strict array bounds checking when it encounters an array of characters.

17. The itoa function is similar to atoi, but it works in reverse.

18. By being able to pass arrays as arguments, you can write your own functions for processing C-strings.

19. The strlen function returns a C-string's length and adds one for .

20. The C++ library provides functions for converting a string representation of a number to a numeric data type, and vice-versa.

21. The ftoa function converts a floating-point value to an ASCII value.

22. If a C-string that cannot be converted to a numeric value is passed to the atoi function, the function's behavior is undefined by C++.

23. If an uppercase character is passed as an argument to toupper, the result will be an uppercase character.

24. Although C++ provides ample library functions to handle numeric values, we must write all of our own functions to manipulate character values.

25. You may use the <, >, <=, >=, ==, and != relational operators to compare string objects.

26. When you store data in a variable, it is automatically saved in a file.

27. Only one file stream object can be declared per C++ program.

28. An alternative to using the open member function is to use the file stream object declaration itself to open the file.

Example: fstream DataFile("names.dat", ios::in | ios::out);

29. File output may be formatted the same way as console screen output.

30. When used by itself, the ios::app flag causes the file's existing contents to be deleted if the file already exists.

Explanation / Answer

Multiple Questions : Answering 1st 5 Questions:

1. True

2. True

3. False, To dereference a structure pointer and simultaneously access a member of the structure,

4. False

5. True

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote