Direction - Directions For electronic submission

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

View Full Document Right Arrow Icon
Directions: For electronic submission, your .zip file should contain one Word (.doc) file, which has all your answers; for programming questions, copy and paste the code from the compiler into the document. Also, for all programming questions, include all the source files (.cpp and .h) that you have written. Name the files based on the question number (for example, ques1dot3.cpp). 1. Write a program that reads in an integer from the keyboard and displays its value doubled, using two functions that you write. The reading function should be int and the displaying function should be void . 2. How does the use of inline speed up the execution of a program? What is the disadvantage of using inline? 3. What is the output produced by the following program? Explain. #include <iostream> using namespace std; void testfunc(int x, int y = 10) { cout << x + y; } int main () { testfunc(3); return 0; } 4. What is the output of the following program? Explain. #include <iostream>
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/30/2010 for the course CS 211 taught by Professor Thomas during the Spring '10 term at The School of the Art Institute of Chicago.

Page1 / 3

Direction - Directions For electronic submission

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

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