0% found this document useful (0 votes)
20 views17 pages

Introduction To Programming Exam Answer Key

Introduction to Programming Exam Answer Key available on Quizplus.com. The resource URL is https://quizplus.com/study-set/492-c-programming-from-problem-analysis-to-program-design

Uploaded by

yiuyacywjq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views17 pages

Introduction To Programming Exam Answer Key

Introduction to Programming Exam Answer Key available on Quizplus.com. The resource URL is https://quizplus.com/study-set/492-c-programming-from-problem-analysis-to-program-design

Uploaded by

yiuyacywjq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Introduction to Programming

Exam Answer Key

https://quizplus.com/study-set/492
15 Chapters
1124 Verified Questions
Introduction to Programming
Exam Answer Key
Cou
Introduction to Programming is designed to provide students with a foundational

understanding of computer programming concepts and problem-solving techniques.

Through hands-on practice, learners are introduced to core principles such as variables,

data types, control structures (including loops and conditionals), functions, and basic

algorithms. Emphasis is placed on writing, testing, and debugging code using a modern

programming language, empowering students to develop logical thinking and

computational skills that serve as a basis for further study in computer science and

software development.

Recommended Textbook
C# Programming From Problem Analysis to Program Design 4th Edition by Barbara Doyle

Available Study Resources on Quizplus


15 Chapters
1124 Verified Questions
1124 Flashcards
Source URL: https://quizplus.com/study-set/492

Page 2
Chapter 1: Introduction to Computing and Programming
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9090

Sample Questions
Q1) Console is a ____ and WriteLine( )is a ____.
A) method, class
B) namespace, method
C) class, namespace
D) class, method
Answer: D

Q2) Comments that use two forward slashes are called ____.
A) block
B) multiline
C) XML
D) inline
Answer: D

Q3) As far as the compiler is concerned,you could actually type the entire program
without touching the Enter key.
A)True
B)False
Answer: True

Q4) ___________ marks the end of a block comment.


Answer: */

To view all questions and flashcards with answers, click on the resource link above.
Page 3
Chapter 2: Data Types and Expressions
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9091

Sample Questions
Q1) The binary equivalent of 24 is ____.
A) 00000011
B) 11000000
C) 00011000
D) 00001111
Answer: C

Q2) The result of 25 % 4 is 6.25.


A)True
B)False
Answer: False

Q3) When you desk check the algorithm,you can compare the results obtained from the
program with calculator results.
A)True
B)False
Answer: True

Q4) The base-2 number system is also called the binary number system.
A)True
B)False
Answer: True

To view all questions and flashcards with answers, click on the resource link above.
Page 4
Chapter 3: Methods and Behaviors
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9092

Sample Questions
Q1) When you assign a default value to a parameter,it then becomes
a(n)____________ parameter.
Answer: optional

Q2) Avoid writing long methods.Consider refactoring when the method exceeds
____________ lines of code
Answer: 25

Q3) Which method returns the largest whole number less than or equal to the specified
number?
A) Max( )
B) Ceiling( )
C) Floor( )
D) Largest( )
Answer: C

Q4) When you assign a default value to a parameter,it then becomes a(n): ____.
A) named parameter
B) static parameter
C) method parameter
D) optional parameter
Answer: D

To view all questions and flashcards with answers, click on the resource link above.
Page 5
Chapter 4: Creating Your Own Classes
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9093

Sample Questions
Q1) A private access modifier is always associated with data members,methods,and
constructors of a class.
A)True
B)False

Q2) Which of the following is true regarding methods of a class?


A) You must use the keyword static.
B) They are called instance methods.
C) To call methods of the class in the class, you must prefix the method name with the
class name.
D) No return type is used when you define a class method.

Q3) Accessors,mutators,and other instance methods are normally defined with what
type of access modifier?
A) private
B) protected
C) internal
D) public

Q4) After the class diagram is created,add the names of data members or fields and
methods
using the_________________ section.

Q5) The body of the constructor methods consist primarily of ____________.


Page 6
To view all questions and flashcards with answers, click on the resource link above.
Chapter 5: Making Decisions
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9094

Sample Questions
Q1) You cannot use the ____________ statement to test for a range of values.

Q2) The switch statement case value can evaluate to all of the following EXCEPT ____.
A) double
B) int
C) string
D) char

Q3) When a single variable may need to be tested for five different values,the most
readable solution would be a(n)____.
A) one-way if statement
B) two-way if statement
C) switch statement
D) nested if....else statement

Q4) String operands can be compared using the relational symbols.They are compared
lexicographically using their Unicode character representation.
A)True
B)False

Q5) With the precedence rules or order of operations,____________ operators are


always listed at the bottom of the hierarchy.

To view all questions and flashcards with answers, click on the resource link above.

Page 7
Chapter 6: Repeating Instructions
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9095

Sample Questions
Q1) s = num.Next(7);
The statement above produces seven random numbers.
A)True
B)False

Q2) A sentinel value is a(n)____________.It is a value that should not be processed.

Q3) How many lines will be printed for the above nested loop?
A) 2
B) 3
C) 5
D) 6

Q4) The only posttest loop structure available in C# is _____.


A) while
B) for
C) do...while
D) foreach

Q5) An option other than looping that can be used to repeat program statement is
_____________.With this technique a method calls itself repeatedly until it arrives at
the solution.

Q6) The ___________ loop structure,which restricts access to read-only,is used to


iterate or move through a collection,suchPage
as an8array.

To view all questions and flashcards with answers, click on the resource link above.
Chapter 7: Arrays
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9096

Sample Questions
Q1) Looking above,the value of price.Length is 5.
A)True
B)False

Q2) One of the special properties in the Array class is Length.It returns ____.
A) an int representing the number of values currently stored in the array
B) an int representing the size the array was dimensioned
C) how much storage is consumed by the entire array
D) the length of an individual element of the array

Q3) Array identifiers are normally defined using a ____________.

Q4) When two or more arrays have a relationship such that you are able to use the
same subscript or index to refer to related elements in the arrays,you have ____ arrays.
A) parallel
B) two dimensional
C) dynamic
D) related

Q5) All arrays,of any type,inherit characteristics from the ____________ class,which
includes a number of predefined methods and properties.

Q6) To create an array to hold the 5 numeric scores,you could write ____________.

Q7) The first element of an array is always referenced by index ____________.


Page 9

To view all questions and flashcards with answers, click on the resource link above.
Chapter 8: Advanced Collections
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9097

Sample Questions
Q1) With the declaration above,price[0,2] refers to 2.2.
A)True
B)False

Q2) Console.Write("anExample".IndexOf("a"));returns ____.


A) null
B) 4
C) 04
D) 0

Q3) Using the code shown above,what is added to total during the first iteration?
A) 0
B) 88
C) 86, 66, 76, 92 and 95
D) unknown, because val is not initialized

Q4) In C#,you may access a two-dimensional array element using the notation [ ,] or
through using a double set of braces ([ ] [ ]).
A)True
B)False

Q5) With the declaration above,price[1] refers to 1.2.


A)True
B)False
Page 10
To view all questions and flashcards with answers, click on the resource link above.
Chapter 9: Introduction to Windows Programming
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9098

Sample Questions
Q1) Using the ____________ feature in Visual Studio,controls can be more easily
aligned when they are initially added to the form.

Q2) When you design Windows applications using Visual Studio,you must be sure to add
program statements to call the Dispose( )method to clean up or release unused
resources back to the operating system.
A)True
B)False

Q3) Avoid using bright colors (such as reds),especially for backgrounds because they
can result in user eye fatigue.
A)True
B)False

Q4) When you create a new Windows application using Visual Studio,if you do not see
the constructed form,but instead see the program statements,you have selected the
wrong template and need to begin again.
A)True
B)False

Q5) ____________ objects are normally used to provide descriptive text for another
control.

To view all questions and flashcards with answers, click on the resource link above.

Page 11
Chapter 10: Programming Based on Events
Available Study Resources on Quizplus for this Chatper
74 Verified Questions
74 Flashcards
Source URL: https://quizplus.com/quiz/9099

Sample Questions
Q1) The Items property can be used to set the initial values for a ListBox object. The Items
editor is opened when you click the ellipsis to the right of the Collection property in the
Properties window.
A)True
B)False

Q2) TabControl objects,which are placed on top of button objects,enable multiple tabs
to appear on a form.
A)True
B)False

Q3) You can assign a(n)____________ to controls,such as text boxes or menu


items,so that text is displayed when the cursor is rested on top of the component.

Q4) The SelectionMode property of the ListBox object ____.


A) enables multiple selections to be made
B) determines whether you can use the mouse or the keyboard
C) sets which of the items is initially selected
D) determines whether use selections can be added

Q5) Both the ComboBox and ListBox objects inherit members from the Control class.
A)True
B)False

To view all questions and flashcards withPage


answers,
12 click on the resource link above.
Chapter 11: Advanced Object-Oriented Programming

Features
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9100

Sample Questions
Q1) To keep subclasses from overriding a method,add the keyword ____________ to
the method's heading.

Q2) Polymorphic programming is associated with the ____________.You do not have


to know how the method goes about doing its work.All you have to know is what
arguments to send,if any,and what you expect to be accomplished when the object
finishes its work.

Q3) By defining data members as private,you protect the data and enable access only
through the object's methods and properties.This describes the ____ feature.
A) abstraction
B) encapsulation
C) polymorphism
D) inheritance

Q4) All .NET languages support multiple inheritance.


A)True
B)False

Q5) The Global Assembly Cache (GAC)stores assemblies designated to be shared by


several applications.
A)True
B)False Page 13

To view all questions and flashcards with answers, click on the resource link above.
Chapter 12: Debugging and Handling Exceptions
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9101

Sample Questions
Q1) The Visual Studio Debugger provides commands for controlling the execution of your
application.
A)True
B)False

Q2) There are over 70 classes derived from the SystemException class.Which one of the
following is NOT a derived class of the SystemException class?
A) System.ArithmeticException
B) System.IO.IOException
C) System.IndexOutOfRangeException
D) System.ApplicationException

Q3) What order should ArithmeticException,DivideByZeroException,and Exception catch


clauses be placed in a try...catch block?
A) ArithmeticException, DivideByZeroException, Exception
B) Exception, ArithmeticException, DivideByZeroException
C) DivideByZeroException, ArithmeticException, Exception
D) Exception, ArithmeticException, DivideByZeroException,

Q4) Exceptions are unexpected conditions that happen frequently.


A)True
B)False

To view all questions and flashcards with answers, click on the resource link above.
Page 14
Chapter 13: Working with Files
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9102

Sample Questions
Q1) Streams are also used in C# to read and write data to binary files.
A)True
B)False

Q2) Which of the following is an abstract class that cannot be instantiated?


A) FileDialog
B) ShowDialog
C) OpenFileDialog
D) Dialog

Q3) The ____________ class provides static methods that aid in creating and moving
through folders and subdirectories.

Q4) The keyword ____ can be used to define a scope for an object such that the CLR
automatically disposes of,or releases,the resource when the object goes out of scope.
A) scope
B) area
C) block
D) using

Q5) When a method uses a(n)____________ modifier,the method belongs to the


class itself,not to a specific object of the class and is thus called using the class name.

To view all questions and flashcards with answers, click on the resource link above.

Page 15
Chapter 14: Working with Databases
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9103

Sample Questions
Q1) You identify which records and fields you want to retrieve from the database using
the SQL ____________ statement.

Q2) In order to test for a date value with Access tables,surround the date with single
apostrophes.Surround the date with pound symbols for SQL Server data.
A)True
B)False

Q3) The ____________ object stores an entire relational table like structure.More than
one table,plus relationships and constraints on the database,can be stored with the
____________ object.The ____________ is considered a memory-resident
representation of the data.

Q4) Typing or inserting an actual SQL query or command as input (as opposed to a
requested value,such as a user login name),gaining access to the tables,and then
stealing or destroying data is an example of a(n)____.
A) SQL query error
B) SQL mistake
C) SQL security reference
D) SQL injection attack

Q5) Typically when you are programming for database access,you use
a(n)____________.

To view all questions and flashcards withPage


answers,
16 click on the resource link above.
Chapter 15: Web-Based Applications
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/9104

Sample Questions
Q1) Selecting HTTP for the File Location,stores files,by default,in the C :\Inetpub\wwwroot
directory.
A)True
B)False

Q2) The default home directory for Web applications on most machines is ____.
A) c :\localhost
B) c :\InetPub\wwwroot
C) http://localhost
D) c :\

Q3) For ASP.NET applications,property settings are not stored in the Web Form Designer
Generated Code region for Web applications. They are stored in the file containing the
HTML tags.
A)True
B)False

Q4) Master page allows you to create and maintain a consistent theme across several
pages for a Web site.
A)True
B)False

To view all questions and flashcards with answers, click on the resource link above.

Page 17

You might also like