CS1371_Fall_2009_PracticeTest2

CS1371_Fall_2009_PracticeTest2 - CS1371 – Computing for...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: CS1371 – Computing for Engineers Practice Test 2 Fall 2009 Page 1 of 5 Georgia Institute of Technology College of Computing CS1371 Computing for Engineers Practice Test 2 - Fall Semester 2009 Multiple Choice 1. The following MATLAB code is executed: A = struct('FirstName','George','Democrat',false); B = fieldnames(A); A.(B{2}) = true; What does the structure A look like after all of the code above has been executed? A. FirstName: 'George' B. FirstName: 'George' C. FirstName: 'George' Democrat: 0 Democrat: 1 Democrat: 0 George: 0 D. FirstName: 'George' E. Error Democrat: 0 George: 1 2. Which choice below is NOT true about the following line of code? f1 = fopen('recipe.txt', 'r') A. The file handle for ‘recipe.txt’ is stored in the variable f1 B. The text from ‘recipe.txt’ is stored in the cell array f1 C. The file has been opened with read only permission D. Both A and C E. Both B and C 3. Given an excel file (test.xls) containing the information below: The command [a,b,c] = xlsread('test.xls'); is run in Matlab. What is the correct order of a, b, and c in order of increasing number of elements (i.e. number of rows multiplied by number of columns for each)? A. c, b, a B. a, b, c C. a == b, c D. b, c, a E. a, b == c CS1371 – Computing for Engineers Practice Test 2 Fall 2009 Page 2 of 5 4. A structure array is defined as follows: Person(1).name = 'Bob' Person(2).name = 'Joe' Person(2)....
View Full Document

This note was uploaded on 11/21/2011 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.

Page1 / 5

CS1371_Fall_2009_PracticeTest2 - CS1371 – Computing for...

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