Fall08-Final-Handout

Fall08-Final-Handout - CS 241 THE UNIVERSITY OF NEW MEXICO...

Info iconThis preview shows pages 1–4. 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

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: CS 241 THE UNIVERSITY OF NEW MEXICO Final Exam – Tuesday, December 11, 10:00am-12:00pm, 2007 COMPUTER SCIENCE Data Organization (Time allowed: 120 minutes) LASTNAME: FIRSTNAME: STUDENT ID NUMBER: SECTION LEADER NAME: Answer all questions in the space provided. Write clearly and legibly, you will not get credit for illegible answers. This is a closed book, closed notes exam. No other aids are allowed. Print your name at the top of every page. 1 circlecopyrt 25 2 circlecopyrt 25 3 circlecopyrt 25 4 circlecopyrt 25 Total 100 Student Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 circlecopyrt Short answer questions [25 points] A) What are four of the ”primitive“ data types in C? [2 points] B) What are four of the bit-wise operators in C? [2 points] C) What’s the difference between x++ and ++x ? Examples please! [2 points] D) for(i=0,j=0;i<5;i++,j=i+j); What are i and j after this loop? [2 points] E) Please list two preprocessor commands with examples! [2 points] F) What compiler flag is used for debugging? Name one debugger we’ve used. [2 points] – 2 – CS 241 Student Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . G) How do you declare a pointer to an array of strings in C? [2 points] H) Using pointer arithmetic, get the 3rd char in the 5th string from the above array. [2 points] I) typedef struct _Person { char name[24]; int age; } Person; How much memory does the array: Person arr[10]; take up? [2 points] J) What is it that controls what commands a makefile will perform? [2 points] K) How do you create a pointer to a variable declared as extern int value; ? [2 points] L) Do the following two statements cause an error when executed in order? Please explain!...
View Full Document

This note was uploaded on 12/11/2010 for the course PSYC 332 taught by Professor Lesnik during the Fall '08 term at UNMSM.

Page1 / 8

Fall08-Final-Handout - CS 241 THE UNIVERSITY OF NEW MEXICO...

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

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