Unformatted text preview:

Homework Assignment 04 1 Declare an array of 10 doubles Double a 10 2 Given int score 5 99 98 97 96 95 What are the values of score 3 score 1 score 5 3 Given int a 5 5 6 7 8 9 int sum prod what are the values of sum and prod computed below sum 0 prod 1 for int i 0 i 3 i sum a i for int i 1 i 4 i prod a i 4 What is wrong with the following code cout Enter number of students cin number int score number 5 Given int a 5 5 6 7 8 int sum what is the value of sum computed below sum a 0 a 2 a 4 6 Assume the function below receives n values from the keyboard and places into the array x void fill int x int n Give a line code to invoke this function to fill the integer array y which is defined as int y 25 7 Draw a diagram showing how an array of integers called int one 7 is placed in the memory such that each array element is 4 bytes 8 Describe the differences between int a 4 a 2 a 3 a 9 Show the output of char symbol 3 a b c for int index 0 index 3 index cout symbol index 10 Write code that will fill the array a declared below with numbers typed at the keyboard Five numbers will be entered per line on four lines int a 4 5


View Full Document

UCSB CS 16 - Homework Assignment 04

Documents in this Course
Load more
Loading Unlocking...
Login

Join to view Homework Assignment 04 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Homework Assignment 04 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?