{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

qz4_ver1_sol - UCR CS010 Winter 2004 Introduction to...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
UCR CS010: Winter 2004 Introduction to Computer Science I Kris Miller Quiz 4: Lecture Sections 001 & 002 1. Which of the following is a legal call to the convertToPounds function? void convertToPounds(double kilograms, double grams, double& pounds, double& ounces); a. void convertToPounds(kg, g, lbs, oz); b. convertToPounds(double kilograms, double grams, double& pounds, double& ounces); c. cout << convertToPounds(kg, g, lbs, oz); d. convertToPounds(kg, g, lbs, oz); 2. What is the output of the following program? #include <iostream> using namespace std; int figureMeOut(int& x, int y); int main() { int a = 20; int b = 10; cout << figureMeOut(a, b) << “ “ << a << “ “ << b << endl; return 0; } int figureMeOut(int& x, int y) { x = 30; y = 40; return x; } 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
3. Which of the following is true for a void function?
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}