C# Programming - Questions and Answers for Competitive Exams | GkSeries
Questions
49. The default value for a character type variable is _________.
- [A] false
- [B] null
- [C] -1.
- [D] 0.
Answer: Option [B]
50. ___________ object represents a connection to a data source.
- [A] Database
- [B] DataRecord
- [C] DBConnection
- [D] DataRelations
Answer: Option [C]
⭐ Make GKSeries Your Preferred Source on Google
Add GKSeries as Preferred Source
51. A number divided by zero is __________ Exception
- [A] ArgumentNull
- [B] InvalidCast
- [C] OverFlow
- [D] Arithmetic
Answer: Option [D]
52. Input can be read from the user using _______ method.
- [A] read
- [B] text
- [C] get
- [D] getdata
Answer: Option [A]
53. Any real word entity is called __________.
- [A] object
- [B] attribute
- [C] characteristic
- [D] class
Answer: Option [A]
54. _________ method converts strings into integer values.
- [A] tryparse
- [B] convert
- [C] concess
- [D] change
Answer: Option [A]
55. _________ is also known for creating Turbo Pascal, a popular language for PC
programming
- [A] Hejlsberg
- [B] Dennis ritchie
- [C] Scott Wiltamuth
- [D] Bjarne Stroustrup
Answer: Option [A]
56. In an inheritance chain which of the following members of base class are accessible to the derived
class members? 1. static 2. protected 3. private 4. shared 5. public
- [A] 1, 3
- [B] 2, 5
- [C] 3, 4
- [D] 4, 5
Answer: Option [B]
57. Which of the following should be used to implement a 'Like a' or a 'Kind of' relationship between two
entities?
- [A] Polymorphism
- [B] Containership
- [C] Templates
- [D] Inheritance
Answer: Option [D]
58. The ___________ namespace includes a number of exception types.
- [A] Argument
- [B] type
- [C] stack
- [D] CLR System
Answer: Option [D]
59. Which of the following keyword is used to change the data and behavior of a base class by replacing a
member of a base class with a new derived member?
- [A] new
- [B] base
- [C] overloads
- [D] override
Answer: Option [A]
60. Which of the following will be the correct output for the C#.NET code snippet given below? String s1
= "Nagpur"; String s2; s2 = s1.Insert(6, "Mumbai"); Console.WriteLine(s2);
- [A] NagpuMumbair
- [B] Nagpur Mumbai
- [C] Mumbai
- [D] NagpurMumbai
Answer: Option [D]