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

Programming in C# MCQ PDF

The document is a comprehensive guide to a C# programming course, covering 15 chapters with 1124 verified questions and flashcards. It introduces fundamental concepts of C#, including syntax, control structures, data types, and object-oriented programming principles. The course aims to prepare students for software development roles through hands-on assignments and projects.

Uploaded by

ptzxytbz0y
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)
24 views17 pages

Programming in C# MCQ PDF

The document is a comprehensive guide to a C# programming course, covering 15 chapters with 1124 verified questions and flashcards. It introduces fundamental concepts of C#, including syntax, control structures, data types, and object-oriented programming principles. The course aims to prepare students for software development roles through hands-on assignments and projects.

Uploaded by

ptzxytbz0y
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

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

strong foundation for software development. Emphasis is placed on core

object-oriented concepts such as classes, inheritance, and interfaces, alongside

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#

applications, preparing them for further study in software development or entry-level

programming roles in a .NET environment.

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) C# has a set of rules,called _________,that must be followed.
Answer: syntax

Q2) When should test plans be developed?


A) During the analysis and design phases
B) After the solution has been designed
C) During the implementation phase
D) After the solution has been coded
Answer: A

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

Q4) The @ symbol in the following string,@ "C :\MyProjects",is called


a(n)____________ character.
Answer: verbatim

Q5) ____________ makes a variable temporarily behave as if it is a different type.


Answer: Casting

To view all questions and flashcards with Page


answers,
4 click on the resource link above.
Chapter 3: Methods and Behaviors
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: [Link]

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

Q2) Which of the following methods are not overloaded?


A) WriteLine( )
B) Write( )
C) ReadLine( )
D) Abs( )
Answer: C

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

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

Q4) To program an object-oriented solution begin by determining what ____ are


needed in the solution.
A) data
B) objects
C) processes
D) methods

Q5) The ____________ constructor does not have any parameters and normally has
no body,just opening and closing curly braces.

Q6) Accessor and mutators are ____________ methods

Q7) Constructors are used to ____________ a class.

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 ____________.

Q2) ____ perform differently based on their operands.


A) Overloaded operators
B) Conditional expressions
C) Boolean operators
D) Relational operators

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

Q5) With ____________,as soon as the value of the entire expression is


known,evaluation stops.

Q6) 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) 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--)

Q2) The third programming construct repetition is also called ____________.

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

Q4) Windows applications use an event-driven model to manage the interaction


between the user and the GUI by handling the repetition for you.
A)True
B)False

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

Q2) 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)

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.

Q4) Elements in an array are sometimes referred to as ____________ variables.

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

Q4) With the declaration above,price[0,2] refers to 2.2.


A)True
B)False

Q5) Like traditional arrays,indexes of ArrayList objects are ____________.

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

Q3) To cause the cursor to be positioned in a specific TextBox,invoke the


____________ method on that control.

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

Q6) To keep subclasses from overriding Page


a method,add
13 the keyword ____________ to
the method's heading.

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

Q4) Once an exception is thrown,control is never returned to the try block.


A)True
B)False

Q5) A(n)____________ error is associated with a language rule violation.

Q6) Exception class has several [Link] ____________ property provides


details about the cause of the [Link] 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) 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

Q2) Which of the following class belongs to the [Link] namespace?


A) FileNotFoundException
B) DirectoryException
C) EndOfStreamException
D) [Link]

Q3) To programmatically avoid having a FileNotFoundException or


DirectoryNotFoundException exceptions thrown in an application,you should send the
filename as an argument to Exists( )before attempting to construct an object.
A)True
B)False

Q4) Which of the following class has public constructors?


A) Stream
B) TextReader
C) File
D) StreamReader

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

Q2) The query language used to access,manipulate,and update data in a database is


called Data Query Language.
A)True
B)False

Q3) In relational databases,data is stored ____.


A) as a string of numeric characters separated by spaces
B) in a tabular format
C) in compressed format
D) as a set of relations

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)____________.

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: [Link]

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

Q5) A(n)____________ that simulates a Windows Phone device is included as part of


the Software Development Kit.

To view all questions and flashcards withPage


answers,
17 click on the resource link above.

You might also like