qz4_ver1_sol

Qz4_ver1_sol - UCR CS010 Winter 2004 Introduction to Computer Science I Kris Miller Quiz 4 Lecture Sections 001 002 1 Which of the following is a

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 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; } { x = 30; y = 40; return x; } a. 30 30 10 b. 30 30 40 c. 40 30 40 d. 20 20 10 e. 30 20 10 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
3. Which of the following is true for a void function? a. There cannot be a return statement. b.
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.

This document was uploaded on 04/02/2012.

Page1 / 4

Qz4_ver1_sol - UCR CS010 Winter 2004 Introduction to Computer Science I Kris Miller Quiz 4 Lecture Sections 001 002 1 Which of the following is a

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online