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

8. (TCO 2) What is wrong with the following C++ statements? int * iptr; double d

ID: 3651372 • Letter: 8

Question

8. (TCO 2) What is wrong with the following C++ statements?
int * iptr;
double d = 123.321;
iptr = &d;
cout << *iptr; (Points : 6)
The cout statement does not contain an endl.
The space following the ampersand should not be there.
The iptr variable cannot be given an address of a double.
All of the above


9. (TCO 2) In the event of an error in a Java program, what class and method would you use to display a message box indicating that an error had occurred? (Points : 6)
Use the showMessageBox method of the System.out class.
Use the showInputDialog method of the JOptionPane class.
Use the show Error Message method of the JDialog class.
Use the showMessageDialog method of the JOptionPane class.

Explanation / Answer

8.The iptr variable cannot be given an address of a double. 9. Use the showMessageDialog method of the JOptionPane class.

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