Programming in C# MCQ PDF
Programming in C# MCQ PDF
[Link]
15 Chapters
1124 Verified Questions
Programming in C#
MCQ PDF
Cou
This course provides a comprehensive introduction to programming with C#, a versatile
and modern object-oriented language developed by Microsoft. Students will learn the
fundamentals of C# syntax, control structures, data types, and error handling, building a
practical skills in file I/O and exception management. Through hands-on assignments
and projects, learners gain experience in designing, coding, testing, and debugging C#
Recommended Textbook
C# Programming From Problem Analysis to Program Design 4th Edition by Barbara Doyle
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) C# has a set of rules,called _________,that must be followed.
Answer: syntax
Q3) The iterative approach in the software development process indicates that the
application will never be fully developed.
A)True
B)False
Answer: False
Q4) The diagram used in object-oriented development to show the characteristics and
behaviors of a class is a(n)____.
A) flowchart
B) structure chart
C) class diagram
D) UML
Answer: C
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) Classes,methods,namespaces,and properties follow the Pascal case naming
convention,which indicates that the first letter in the identifier is in lowercase and the first
letter of each subsequent concatenated word is capitalized.
A)True
B)False
Answer: False
Q2) The base-2 number system is also called the binary number system.
A)True
B)False
Answer: True
Q3) The ____________ data type was added to the language to eliminate the
problems of loss of precision in mathematical operations that occurred in previous
languages.
Answer: decimal
Sample Questions
Q1) A standard convention used by C# programmers is to use Pascal case style for
class,data member identifiers,and method identifiers.
A)True
B)False
Answer: False
Q3) Method names should be defined with meaningful names using ____.
A) camel case
B) singular nouns
C) upper case characters
D) verb phrases
Answer: D
Q4) ____________ is used to indicate that no value is being returned from a method.
Answer: void
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) Three of the contextual keywords associated with properties are get,set,and value.
A)True
B)False
Q2) Since the data members of the class are defined as private,their public property
counterpart must be used to assign new values to the data members.
A)True
B)False
Q5) The ____________ constructor does not have any parameters and normally has
no body,just opening and closing curly braces.
To view all questions and flashcards with Page 6 click on the resource link above.
answers,
Chapter 5: Making Decisions
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: [Link]
Sample Questions
Q1) The equality operator in C# is represented by ____________.
Q3) How can the compound conditional expression ((average > 79 && average <=
89))be written to eliminate the logical operator - without changing the logic?
A) remove the && and create a nested if statement
B) (average > 79 <= 89)
C) by replacing the && with ||
D) (79 > average <= 89)
Q4) The ternary operator ( ? : )provides another way to express a simple if...else selection
statement.
A)True
B)False
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) An example for statement that has a compound initialization,compound test and
compound update could be written as ____.
A) for (int r = 0; c = 5; r < 3 && c > 2; r++; c--)
B) for (int r = 0; c = 5; r < 3 ; c > 2; r++; c--)
C) for (int r = 0, c = 5; r < 3, c > 2; r++, c--)
D) for (int r = 0, c = 5; r < 3 && c > 2; r++, c--)
Q3) Instead of requiring that a dummy value be entered after all values are processed,a
____-controlled loop initializes a variable on the outside of the loop and then evaluates
the variable to see when it changes [Link] value is changed inside the loop body
when the loop should exit.
A) counter
B) sentinel
C) state
D) change
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) All arrays are objects of the base type ____ class.
A) Object
B) Base
C) Super
D) Array
Q3) What happens when you assign one array to another using the assignment
operator?
A) An error message is generated.
B) Elements are copied to new memory locations.
C) Both arrays become value type data elements.
D) Both arrays reference the same memory locations.
Q5) An entire array collection of data can be ordered alphabetically with a call to the
Page 9
Array class member method ____________.
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) The ArrayList class requires you to add and remove elements to/from the structure
using Push( )and Pop( )methods.
A)True
B)False
Q2) Strings are considered ____________ because once you give a string a value;it
cannot be
[Link] that seem to be modifying a string are actually returning a new
string containing the modification.
Q3) The ArrayList class can be used to create a listlike structure that can dynamically
increase or decrease in length.
A)True
B)False
Q6) The ____________ method is used with the ArrayList class to push items on the
list.
Q7) The property ____________ returns the number of dimensions of the array.
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: [Link]
Sample Questions
Q1) One of the guidelines for good design is to try to place as many controls on the form
as you are able to without overlapping any.
A)True
B)False
Q2) 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
Q4) The field of research that concentrates on the design and implementation of
interactive computing systems is called ____.
A) Human Computer Interaction (HCI)
B) Graphical User Interface (GUI)
C) System Interaction (SI)
D) System Computer Interaction (SCI)
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) In order for event handlers to be called using delegates,the delegate must ____.
A) be declared with a return type of void
B) include at least two parameter arguments representing the event and object
C) be instantiated in the application as a delegate
D) maintain a list of the registered event handlers for the event
Q2) ____________ objects have an added feature over a ListBox objects that they
contain their own text box field as part of the object,but they allow only a single selection
to be made.
Q3) The ____ class in the [Link] namespace enables you to add more
functionality to your application by offering additional user options,such as adding
layers of menus.
A) MenuStrip
B) MenuDialog
C) Main
D) DialogMenu
Q4) The declaration for a delegate looks more like a method declaration than a class
definition.
A)True
B)False
Q5) The ____________ event fires when a key is pressed while the control has focus.
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) Class library components should be compiled using a Build option instead of
Running the application.
A)True
B)False
Q2) Classes that inherit from a base class are called ____________ classes.
Q3) ILDASM,which must be run from the command line,is a tool used to view an
assembly.
A)True
B)False
Q4) Once a DLL is available,any application can add a reference to the [Link]
referenced file with the .dll extension becomes part of the application's private assembly.
A)True
B)False
Q5) Multiple classes can implement the same interface,but a class can implement only
one interface.
A)True
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) Custom exceptions classes must derive from the [Link] class.
A)True
B)False
Q2) When you write your own exceptions,the new class should be derived from ____.
A) Exception
B) [Link]
C) [Link]
D) [Link]
Q3) Markers placed in an application to indicate the program should halt execution
when it reaches that spot is a ____.
A) breakpoint
B) break mode
C) debug point
D) debugger spot
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) The constructor for the StreamWriter can include additional arguments indicating
whether the file should be appended to or overwritten if it already exists.
A)True
B)False
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) DataAdapter classes are used to exchange data between a database source and a
dataset object.
A)True
B)False
Q4) A foreign key is a column (field)or combination of columns that uniquely identifies a
row in a table.
A)True
B)False
Q5) Typically when you are programming for database access,you use
a(n)____________.
Sample Questions
Q1) Web services publish information in a standardized format about their location and
functionality in a WSDL registry.
A)True
B)False
Q2) The Calendar control has a number of properties including the ____________
property that is used to pick the month,day,and year for display.
Q3) 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
Q4) Using Visual Studio,you can add which of the following types of controls?
A) Navigation
B) Login
C) Data
D) All of the above