Page | 1
ISDS 505 Exam 1 Questions with
Detailed Verified Answers
Question: Which of the following is NOT a valid C# identifier
Select one:
a. _order
b. a
c. this
d. a1
Answer: c. this
Question:What is NOT considered a keyword by the C# language?
Select one:
a. catch
b. global
c. implicit
d. static
Answer: b. global
Question:In Object-oriented programming language, the ability to create
methods that act appropriately depending on the context is called _________.
Select one:
a. inheritance
b. encapsulation
c. instance
, Page | 2
d. polymorphism
Answer: d. polymorphism
Question:in "using System;", what is "System" referring to?
Select one:
a. class
b. variable
c. namespace
d. method
Answer: c. namespace
Question:Which of the following pairs is an example of a class and an object,
in that order?
Select one:
a. animal and bear
b. cup and glass
c. CSUF and university
d. car and vehicle
Answer: a. animal and bear
Question:What is the value of the expression 3+4*2 ?
Select one:
a. 10
b. 11
c. 5
d. 14
Answer: b. 11
, Page | 3
Question:What is the value of 5>=3?
Select one:
a. 1
b. 0
c. false
d. true
Answer: d. true
Question:In C#, you use the ____ data type to hold a series of characters.
Select one:
a. string
b. int
c. sbyte
d. char
Answer: a. string
Question:Assume you have a variable declared as int var1=5; What is the value
of 27%var1 ?
Select one:
a. 5
b. 2
c. 4
d. 0
Answer: b. 2
, Page | 4
Question:Assume that you declared a double variable called unitPrice which is
used to get an item's unit price. Which of the following will display the unit
price in a currency format with 2 decimal places?
Select one:
a. Console.WriteLine(unitPrice.ToString());
b. Both Console.WriteLine(unitPrice.ToString("C")); and
Console.WriteLine(unitPrice.ToString("C2"));
c. Console.WriteLine(unitPrice.ToString("C"));
d. Console.WriteLine(unitPrice.ToString("C2"));
Answer: b. Both Console.WriteLine(unitPrice.ToString("C")); and
Console.WriteLine(unitPrice.ToString("C2"));
Question:Programming languages such as C#, Java, and Visual Basic are
____________________languages.
a. machine
b. high-level
c. low-level
d. uninterpreted
Answer: b. high-level
Question:A program that translates high-level programs into intermediate or
machine code is a(n) _______________________ .
Answer: d. compiler
Question:The grammar and spelling rules of a programming language
constitute its _____________ .
Answer: d. syntax
ISDS 505 Exam 1 Questions with
Detailed Verified Answers
Question: Which of the following is NOT a valid C# identifier
Select one:
a. _order
b. a
c. this
d. a1
Answer: c. this
Question:What is NOT considered a keyword by the C# language?
Select one:
a. catch
b. global
c. implicit
d. static
Answer: b. global
Question:In Object-oriented programming language, the ability to create
methods that act appropriately depending on the context is called _________.
Select one:
a. inheritance
b. encapsulation
c. instance
, Page | 2
d. polymorphism
Answer: d. polymorphism
Question:in "using System;", what is "System" referring to?
Select one:
a. class
b. variable
c. namespace
d. method
Answer: c. namespace
Question:Which of the following pairs is an example of a class and an object,
in that order?
Select one:
a. animal and bear
b. cup and glass
c. CSUF and university
d. car and vehicle
Answer: a. animal and bear
Question:What is the value of the expression 3+4*2 ?
Select one:
a. 10
b. 11
c. 5
d. 14
Answer: b. 11
, Page | 3
Question:What is the value of 5>=3?
Select one:
a. 1
b. 0
c. false
d. true
Answer: d. true
Question:In C#, you use the ____ data type to hold a series of characters.
Select one:
a. string
b. int
c. sbyte
d. char
Answer: a. string
Question:Assume you have a variable declared as int var1=5; What is the value
of 27%var1 ?
Select one:
a. 5
b. 2
c. 4
d. 0
Answer: b. 2
, Page | 4
Question:Assume that you declared a double variable called unitPrice which is
used to get an item's unit price. Which of the following will display the unit
price in a currency format with 2 decimal places?
Select one:
a. Console.WriteLine(unitPrice.ToString());
b. Both Console.WriteLine(unitPrice.ToString("C")); and
Console.WriteLine(unitPrice.ToString("C2"));
c. Console.WriteLine(unitPrice.ToString("C"));
d. Console.WriteLine(unitPrice.ToString("C2"));
Answer: b. Both Console.WriteLine(unitPrice.ToString("C")); and
Console.WriteLine(unitPrice.ToString("C2"));
Question:Programming languages such as C#, Java, and Visual Basic are
____________________languages.
a. machine
b. high-level
c. low-level
d. uninterpreted
Answer: b. high-level
Question:A program that translates high-level programs into intermediate or
machine code is a(n) _______________________ .
Answer: d. compiler
Question:The grammar and spelling rules of a programming language
constitute its _____________ .
Answer: d. syntax