C# Viva Questions
C# Viva Questions
1. What is C# programming.
2. How C# program Executes.
3. Advantages of C# programming.
4. Write Structure of C# program.
5. What are variables in C# & what are the
categories of variables.
6. Explain every variable category with example.
7. What are Data types in C#.
8. How many types and what are the types of Data
type in C# language.
9. Explain value data types and reference data
types with example.
10. What are Control statements and name the
control statements present in C# language.
11. Explain if, if-else, if-else-if, nested-if, switch
statements with example.
12. What is Namespace in C#.
13. What is “System” or “using System” and why
it is used in C#.
14. What is “Console.WriteLine” and
“Console.ReadLine” and why it is used in C#.
15. How to take input from the user in C#.
16. Why we use Console.ReadLine() at last.
17.To convert the given input to required data type
which methods we use? What are those.
18. What is the difference between Convert method
and parse method.
20. What is looping statements and name the
looping statements present in C# language.
21. Explain for, while, do-while loops with
example.
22. Explain Break and Continue statements with
example.
23. What is Access Specifiers in C# name the
access specifiers present in C# language.
24. What is Private, Public, Protected and Internal
access specifiers when we use these.
25. What is Type conversion in C# and what are
the types.
26. What is Implicit type conversion when we use
this explain with example.
27. What is Explicit type conversion when we use
this explain with example.
28. What is String? Strings are mutable or
immutable.
29. What is String Builder and what is the purpose
using the String builder.
30. What is substring method explain with
example.
31. Explain any 3 string methods with example.
32. What is Exception Handling in C#? from which
base class all the Exception are derived.
33. Name few Exceptions and why those
exceptions used.
34. What we use for Handling Exception in C#.
35. What is try, catch, and finally blocks? Why we
use explain with example.
36. Can we write multiple catch blocks? How to
use multiple catch blocks in C# program.
37. What is Array.
38. What are Advantages and Disadvantages of
Arrays.
39. What are the types of Arrays.
40. What is Single Dimensional Array? Explain
(declaration, initialization) with example.
41. What is Multi-Dimensional Array? Explain
(declaration, initialization) with example.
42. What is Jagged Array? Explain (declaration,
initialization) with example.
43. What are Classes and Objects explain with
example.
44. What is Constructor? Why constructors used.
45. What is Constructor Overloading.
46. What is Method and Operator Overloading.
47. What is Polymorphism? Name the types of
Polymorphism.
48. What is the use of files? What are the methods
we use to create, write and read a file.
49. What is stack Expalin with example.
50. What is overflow and underflow conditions.