Programming Languages MCQ
PDF
[Link]
15 Chapters
1124 Verified Questions
Programming Languages
MCQ PDF
Cou
This course provides a comprehensive introduction to the fundamental concepts of
programming languages, exploring syntax, semantics, and paradigms such as
imperative, functional, object-oriented, and logic programming. Students will examine
how programming languages are designed and implemented, analyze language
features such as data types, control structures, and abstraction mechanisms, and gain
practical experience by writing programs in several representative languages. Through
hands-on exercises and theoretical discussions, learners will develop a deeper
understanding of language design choices and their implications on 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: [Link]
Page 2
Chapter 1: Introduction to Computing and Programming
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: [Link]
Sample Questions
Q1) The European Computer Manufacturers Association ratified C# and its CLI
specifications into international standards.
A)True
B)False
Answer: True
Q2) On a class diagram,the minus symbol shown beside the data member indicates the
member is ____.
A) accessible to any methods that use the class
B) a behavior of the data
C) public
D) private
Answer: D
Q3) Comments that use two forward slashes are called ____.
A) block
B) multiline
C) XML
D) inline
Answer: D
Q4) A(n)____________ is a mock-up of screens depicting the look of the final output.
Answer: prototype
To view all questions and flashcards with Page 3 click on the resource link above.
answers,
Chapter 2: Data Types and Expressions
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: [Link]
Sample Questions
Q1) The @ symbol in the following string,@ "C :\MyProjects",is called
a(n)____________ character.
Answer: verbatim
Q2) ____________ is the universal character-encoding schema that provides a
unique number for every character in many different languages.
Answer: Unicode
Q3) In order to do a compile-time initialization of a decimal type,it is necessary to add a
d or D onto the end of the value.
A)True
B)False
Answer: False
Q4) Given the following declarations,what is stored in ans as a result of the arithmetic
expression? int ans = 0,v1 = 5,v2 = 8;
Ans = v2 % v1++;
A) 1.3333
B) 1.6
C) 2
D) 3
Answer: D
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: [Link]
Sample Questions
Q1) _____________access offers the fewest access limitations;there are basically no
restrictions on accessing ____________ members or classes.
Answer: Public
Q2) When a class or a class member does not specify a modifier,the default accessibility
level of _______________ is assumed.
Answer: private
Q3) The term ____________ is often used to indicate where an identifier has meaning
and can be used
Answer: visible
Q4) If a method does not return a value,the void keyword is placed inside the
parentheses in the method heading.
A)True
B)False
Answer: False
Q5) The Write( ),WriteLine( ),Read( ),and ReadLine( )methods are all overloaded.
A)True
B)False
Answer: False
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: [Link]
Sample Questions
Q1) After the class diagram is created,add the names of data members or fields and
methods
using the_________________ section.
Q2) Constructors ____.
A) can be overloaded.
B) do not have to be written.
C) do not return a value.
D) all of the above.
Q3) When you define a property,you can define the set without the get,but you must
define a get.
A)True
B)False
Q4) Accessor and mutators are ____________ methods
Q5) The static keyword must not be used with ____.
A) data members
B) instance methods
C) class methods
D) all of the above
Q6) If berber is an object,the statement [Link](berber);automatically invokes the
____________ method. 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: [Link]
Sample Questions
Q1) The switch statement is considered a multiple selection structure and it also goes by
the name case statement.
A)True
B)False
Q2) Selection statements must include a Boolean variable.
A)True
B)False
Q3) With a switch statement,if no match is made,the statements associated with
____________ are executed.
Q4) Equality comparisons with floating-point and decimal types often produce
unpredictable results.
A)True
B)False
Q5) No fall through is permitted in C# if the previous case label has code.
A)True
B)False
Q6) The conditional operator,also called the ____________ provides another way to
express a simple if...else selection statement.
Q7) The switch statement also goes by the name ____________.
Page 7
To view all questions and flashcards with answers, click on the resource link above.
Chapter 6: Repeating Instructions
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: [Link]
Sample Questions
Q1) Which of the following is NOT a keyword used to enable unconditional transfer of
control to a different program statement?
A) continue
B) break
C) goto
D) while
Q2) int sum = 0;
int number = 1;
while (number < 100)
{
sum = sum + number;
}
The program statements above produce an infinite loop.
A)True
B)False
Q3) Given the code snippet above,how many times will the loop body be executed?
A) 4
B) 5
C) 6
D) 10
To view all questions and flashcards with answers, click on the resource link above.
Page 8
Chapter 7: Arrays
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: [Link]
Sample Questions
Q1) Given an array declaration of int anArray[1000],which of the following would be a
valid call to a DisplayContents( )method to send the full array into the method as an
argument?
A) DisplayContents(int anArray[1000])
B) DisplayContents(anArray[1000])
C) DisplayContents(anArray[ ] )
D) DisplayContents(anArray)
Q2) Given an array declared to hold 100 values,the largest index that can be used with
the array is:
A) based on what index is used when the first value is placed in the array
B) 99
C) 100
D) undetermined
Q3) The Copy( )method,shown above,is a(n)____________ method.
Q4) To create an array to hold the 5 numeric scores,you could write ____________.
Q5) Arrays can be used as fields or instance variables in classes;and,arrays of objects
can be declared.
A)True
B)False
Q6) Use the ____________ keyword toPage
instantiate
9 an object of an array.
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: [Link]
Sample Questions
Q1) Collection classes are classes that enable you to store and retrieve various groups of
objects.
A)True
B)False
Q2) With a two dimensional array,when the number of columns in the rows differs,a
jagged array can be created.
A)True
B)False
Q3) Multi-dimensional array identifiers are normally defined using a plural noun.
A)True
B)False
Q4) Which of the following is a valid example of calling a method and sending it a
two-dimensional array argument?
A) DisplayArrayContents(int [ , ] anArray);
B) DisplayArrayContents(anArray);
C) DisplayArrayContents(anArray[10, 2]);
D) DisplayArrayContents(int [10, 2] anArray);
Q5) ____________ class represents a simple last-in-first-out (LIFO)collection of
objects.
Q6) The property ____________ returns the10
Page number of dimensions of the array.
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: [Link]
Sample Questions
Q1) Using the tools available from the FORMAT menu can greatly reduce your
development [Link] of the following are menu options EXCEPT ____.
A) Make Same Size
B) Align
C) Horizontal Spacing
D) Attach to Process
Q2) The Form property used to set the title bar on the Windows form is ____.
A) Title
B) Caption
C) Text
D) Bar
Q3) All changes to the property values can be made in the ____________ window at
design time.
Q4) Double-clicking on the form when you are using the Form Designer brings up the
Code Editor and also ____.
A) creates a syntax error
B) registers a double click event
C) runs the application
D) adds a form load method heading
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: [Link]
Sample Questions
Q1) ListBox objects have an added feature in that they contain their own text box field as
part of the object.
A)True
B)False
Q2) One of the advantages of a ListBox object over other types of objects used for input
is ____.
A) it can be used for both input and output
B) it can be used for both console and Windows applications
C) an event handler method can be registered
D) multiple selections can be made
Q3) A test plan to verify the accuracy of the application should be designed before
coding the application.
A)True
B)False
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) The default event-handler method for CheckBox objects is ____________.
Page 12
To view all questions and flashcards with answers, 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: [Link]
Sample Questions
Q1) Classes can have a "has a" [Link] is a concept called ____ or
aggregation.
A) "is a"
B) inheritance
C) polymorphism
D) containment
Q2) Polymorphic programming is associated with the ____________.You do not have
to know how the method goes about doing its [Link] 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) Variables declared as dynamic ____.
A) require boxing or casting to identify the actual data type
B) can hold any type of value
C) stores data as strings
D) must have an associated data type added as part of the declaration
Q4) If a class implements more than one ____________,they all appear on the class
definition line separated by commas.
Q5) When you override a method,the signatures of the methods must match.
A)True Page 13
B)False
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: [Link]
Sample Questions
Q1) If an event that creates a problem happens frequently,it is best to write instructions
to take care of the problem with ____.
A) try...catch clauses
B) conditional expressions
C) exceptions
D) try...catch...finally blocks
Q2) When defining your own exception classes,you must use the word "Exception" as part
of the identifier.
A)True
B)False
Q3) Selecting ____________ when you are in Debug mode,causes the program to
execute from the halted line until it reaches the next breakpoint,if there is one.
Q4) C# adheres to a fairly sophisticated set of rules known as C# ____________.
Q5) An exception handler is a ____.
A) block of code that is executed when an exception occurs
B) Windows event handler
C) menu option under the debugger
D) trace of methods invoked during the problem
Q6) Custom exceptions must derive from the ____________ class.
Page 14
To view all questions and flashcards with answers, click on the resource link above.
Chapter 13: Working with Files
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: [Link]
Sample Questions
Q1) When you close a file,no arguments are sent to the method;however,the Close(
)method must be called with a file object such as [Link]( ).
A)True
B)False
Q2) With Visual Studio when you create a file (or attempt to access one),if a path is not
specified with the filename,the Apps\Debug subdirectory of the current project is used.
A)True
B)False
Q3) Which of the following class has public constructors?
A) Stream
B) TextReader
C) File
D) StreamReader
Q4) The files created using the ____________ class are readable by the computer
but,unlike the files created by the StreamWriter class,you cannot simply open and read
the contents of the file using Notepad.A program is needed to interpret the file contents.
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: [Link]
Sample Questions
Q1) Which of the following is a typed accessor method of the OleDbDataReader class?
A) GetBoolean( )
B) AccessInt( )
C) RetrieveDouble( )
D) ReadDecimal( )
Q2) When you place an @ in front of a string,the string becomes a(n)____.
A) comment
B) verbatim string
C) numeric value
D) argument
Q3) A ____ is used to perform a forward-only (sequential)access of the data in the
data source while a ____ is used to populate a dataset and updates the database.
A) connection, data adapter
B) data adapter, data reader
C) data reader, command
D) data reader, data adapter
Q4) You can use the ____________ to edit or write new SQL statements for each of
the SelectCommand,InsertCommand,UpdateCommand,and DeleteCommand's
CommandTexts.
Q5) Typically when you are programming for database access,you use
a(n)____________. Page 16
To view all questions and flashcards with answers, 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: [Link]
Sample Questions
Q1) [Link] pages end with a(n)____ file extension.
A)asp
B)net
C)asmx
D)aspx
Q2) The only event listed below that is automatically posted back to the server when the
event is triggered is the ____.
A) ListBox SelectedIndexChanged event
B) TextBox KeyPress event
C) RadioButton CheckedChanged event
D) Button Click event
Q3) There are more controls to add to a Web application than there are for Windows
applications.
A)True
B)False
Q4) The .[Link] file is where your program logic,including your event handlers,is stored
with [Link] Web sites.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 17