qz3_sol - UCR CS010: Winter 2004 Introduction to Computer...

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 3 1. Which output statement uses a correct function CALL to the function declared below? int my_func(int my_int, double my_double); // function declaration a. cout << int my_func(int my_int, double my_double); b. cout << my_func(int my_int, double my_double); c. cout << my_func(some_int, some_double); d. cout << my_func(10, 20.0); e. c and d 2. What is the output of the following program? #include <iostream> using namespace std; int a(int x, int y); int main() { int x = 10; int y = 20; cout << a(x, y) << “ “ << x << “ “ << y << endl; return 0; } int a(int x, int y) { x = y; return x; } a. 20 20 20 b. 20 10 20 c. 10 10 20 d. 10 10 10 e. 20 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. What is the output of the following statement? cout << static_cast<double>(3) / 4 << endl; a. 3 b. 0.5 c. 0 d. 0.75 4. What is the output of the following statement? cout << static_cast<double>(3 / 4) << endl;
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 / 3

qz3_sol - UCR CS010: Winter 2004 Introduction to Computer...

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