Top Banner
LOTS OF SAMPLE QUESTIONS FOR YOUR CSC-226 MIDTERM CAUTION: I DID NOT WRITE THESE QUESTIONS, SO SOME OF THEM ARE POORLY WORDED AND SOME OF THEM EVEN CONTAIN ERRORS. WE WILL CONCENTRATE ONLY ON SOME OF THE QUESTIONS FOR OUR REVIEW. AT LEAST REVIEW THE QUESTIONS MARKED IN RED. 1.1 Introduction 1.1 Which of the following statements is true? (a) hardware controls software (b) software commands the computer to perform actions and make decisions (c) Pascal and C are object oriented programming languages (d) ANSI is the international standards institute ANS: (b) 1.2 Which of the following is going to be the key programming methodology for the next decade? (a) object-oriented programming (b) structured programming (c) “legacy C code” (d) “live-code approach” ANS: (a) 1.2 What is a Computer? 1.3 Today's fastest computers are called __________. (a) mega computers (b) terminals (c) supercomputers
100

CSC-226 Chap 1-6 Review

Nov 24, 2015

Download

Documents

blurryfury

Dietel Edition 7
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

1

LOTS OF SAMPLE QUESTIONS FOR YOUR CSC-226 MIDTERM

CAUTION: I DID NOT WRITE THESE QUESTIONS, SO SOME OF THEM ARE POORLY WORDED AND SOME OF THEM EVEN CONTAIN ERRORS. WE WILL CONCENTRATE ONLY ON SOME OF THE QUESTIONS FOR OUR REVIEW.

AT LEAST REVIEW THE QUESTIONS MARKED IN RED.1.1 Introduction

1.1 Which of the following statements is true?

(a) hardware controls software

(b) software commands the computer to perform actions and make decisions

(c) Pascal and C are object oriented programming languages

(d) ANSI is the international standards institute

ANS: (b)

1.2 Which of the following is going to be the key programming methodology for the next decade?

(a) object-oriented programming

(b) structured programming

(c) legacy C code

(d) live-code approach

ANS: (a)

1.2 What is a Computer?

1.3 Today's fastest computers are called __________.

(a) mega computers

(b) terminals

(c) supercomputers

(d) CPUs

ANS: (c)

1.4 Which of the following would not be considered hardware?

(a) an operating system

(b) a CPU

(c) a keyboard

(d) a disk

ANS: (a)

1.5 Computer programs are __________.

(a) sets of control instructions

(b) the information processed by the computer

(c) the various devices (disks, memory, keyboard) that comprise a computer system

(d) the people programming the computers

ANS: (a)

1.3 Computer Organization

1.6 Which of the following is not one of the six logical units of a computer?

(a) input unit

(b) programmer unit

(c) memory unit

(d) output unit

ANS: (b)

1.7 The central processing unit (CPU) __________.

(a) retains information so that the information can be readily available for processing.

(b) performs calculations such as addition, subtraction, multiplication, and division.

(c) supervises the operation of the other sections.

(d) obtains information from input devices and places it at the disposal of other units.

ANS: (c)

1.8 Programs or data not actively being used by the other units are placed on the __________.

(a) output unit.

(b) memory unit.

(c) secondary storage unit.

(d) central processing unit.

ANS: (c)

1.4 Evolution of Operating Systems

1.9 The amount of work a computer can process is known as __________.

(a) input

(b) output

(c) distribution

(d) throughput

ANS: (d)

1.10 If a program is made to share the resources of the computer with other programs, this is known as __________.

(a) batch processing

(b) multiprogramming

(c) client/server computing

(d) object-oriented programming

ANS: (b)

1.5 Personal Computing, Distributed Computing and Client/Server Computing

1.11 When computing is spread over networks rather than performed at a centralized location, this is known as __________.

(a) multiprogramming

(b) distributed computing

(c) personal computing

(d) batch processing

ANS: (b)

1.12 Programs and data used in client/server computing are stored on __________.

(a) personal computers

(b) supercomputers

(c) file servers

(d) local area networks

ANS: (c)

1.6 Machine Languages, Assembly Languages, and High-level Languages

1.13 Which of the following is not a general programming language type?

(a) machine languages

(b) low-end languages

(c) assembly languages

(d) high-level languages

ANS: (b)

1.14 A computer can directly understand only its own ___________.

(a) machine language

(b) assembly language

(c) high-level language

(d) none of the above

ANS: (a)

1.15 Assemblers__________.

(a) convert machine language into high-level language.

(b) convert assembly language into machine language.

(c) convert high-level language into machine language.

(d) convert high-level language into assembler language.

ANS: (b)

1.16 Programs that directly execute high-level language programs without compiling are called __________.

(a) assemblers

(b) interpreters

(c) compilers

(d) translators

ANS: (b)

1.7 The History of C

1.17 Which of the following languages was an ancestor of C?

(a) A

(b) A+

(c) B

(d) B+

ANS: (c)

1.8 The C Standard Library

1.19 When programming in C you will typically use all of the following building blocks except __________.

(a) functions from the standard library

(b) functions you create yourself

(c) functions other people have created for you

(d) functions provided by ANSI / ISO

ANS: (d)

1.20 Using standard library functions can be more efficient because __________.

(a) they save programming time

(b) they are carefully written to perform optimally

(c) they increase program portability

(d) all of the above.

ANS: (d)

1.9 The Key Software Trend: Object Technology

1.21 Which of the following is not an advantage of object-oriented programming?

(a) software is more reusable

(b) software is more understandable and easier to maintain

(c) programmers are able to model the real world

(d) all of the above are advantages of object-oriented programming

ANS: (d)

1.10 C++ and C++ How to Program

1.22 ________ are essentially reusable software components that model items in the real world.

(a) objects

(b) supersets

(c) modules

(d) developers

ANS: (a)

1.23 C++ was developed by ________.

(a) Bjarne Stroustrup

(b) Ada Lovelace

(c) Blaise Pascal

(d) Ken Thompson

ANS: a

1.11 Java and Java How to Program

1.24 Java was developed by ___________.

(a) Sun Microsystems

(b) Bell Labs

(c) IBM

(d) ANSI/ISO

ANS: (a)

1.25 What language(s) Java is based on?

(a) B and BCPL

(b) C and C++

(c) Smalltalk

(d) FORTRAN

ANS: (b)

1.12 Other High-level Languages

1.26 Which of the following is not true about COBOL?

(a) it stands for common business oriented language.

(b) more than half of all business software is programmed in it.

(c) it was developed in 1992.

(d) COBOL is used for commercial applications that require precise and efficient manipulation of large amounts of data.

ANS: (c)

1.27 Which popular language was developed by IBM Corporation to be used for scientific and engineering applications that require complex mathematical computations?

(a) Smalltalk

(b) Pascal

(c) FORTRAN

(d) COBOL

ANS: (c)

1.13 Structured Programming

1.28 Pascal was designed for what purpose?

(a) scientific and engineering applications requiring complex mathematical computations

(b) commercial applications requiring precise and efficient manipulation of large amounts of data

(c) teaching structured programming in academic environments

(d) the DOD

ANS: (c)

1.29 Performing many activities that occur in parallel is known as ___________.

(a) compiling

(b) distributed computing

(c) batch processing

(d) multitasking

ANS: (d)

1.14 Basics of a Typical C Environment

1.30 The compile stage is when ____________.

(a) the object code is linked with code for functions in other files

(b) the C program is translated into machine language code

(c) the program is executed one instruction at a time

(d) the program is placed in memory

ANS: (b)

1.31 The linker creates __________.

(a) an executable image

(b) a preprocessor directive

(c) object code

(d) an input stream

ANS: (a)

1.15 Hardware Trends

1.32 Over the past decades which of the following has occurred?

(a) hardware costs have fallen rapidly

(b) software costs have fallen rapidly

(c) hardware costs have risen rapidly

(d) none of the above

ANS: (a)

1.33 The invention of the __________ in the late 1970s and 1980s laid the groundwork for the productivity improvements of the 1990s.

(a) transistor

(b) c

(c) inexpensive hardware

(d) microprocessor chip

ANS: (d)

1.16 History of the Internet

1.34 An ancestor of today's Internet was _____________.

(a) ARPAnet

(b) e-mail

(c) FORTRAN

(d) Univac 1108

ANS: (a)

1.35 The technique by ARPA to allow multiple users to send and receive information at the same time over the same communications paths is known as ___________.

(a) electronic mail

(b) packet switching

(c) networking

(d) multitasking

ANS: (b)

1.36 What is bandwidth?

(a) information carrying capacity

(b) response time

(c) the set of networking protocols

(d) an error-control technique

ANS: (a)

1.17 History of the World Wide Web

1.37 The World Wide Web

(a) was developed at roughly the same time as the Internet

(b) paved the way for the Internet

(c) was developed years after the Internet

(d) was designed for stand-alone computers

ANS: (c)

1.18 General Notes About C and This Book

1.38 What does KIS stands for?

(a) Keep In Sync

(b) Keep It Simple

(c) Keep Iterating Stuff

(d) Keyword Interpreted Sequence

ANS: (b)

2.1 Introduction

2.2 A Simple Program: Printing a Line of Text

2.1 Lines beginning with the _______________ let the computer know that the rest of the line is a comment.

(a) /*(b) **

(c) REM

(d)