ExamVeda
Login
Home
1
What does C# stand for?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
2
C# is developed by which company?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
3
Which of the following is NOT a primitive data type in C#?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
4
What is the entry point method in a C# program?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
5
What is the extension of C# source file?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
6
Which of the following statements is true about C#?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
7
What is the keyword used to declare a class in C#?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
8
Which of the following is NOT a valid identifier in C#?
Discuss
Answer & Solution
Answer: Option B
Solution:
Identifiers in C# are names given to variables, methods, classes, etc.

Valid identifiers in C# can include letters (a-z, A-Z), digits (0-9), and underscores (_), but they cannot start with a digit.

Option A: _myVariable - This is a valid identifier because it starts with an underscore and follows the rules.

Option B: 2ndVariable - This is an invalid identifier because it starts with a digit, which is not allowed in C# identifiers.

Option C: My_Variable - This is a valid identifier as it follows the rules.

Option D: myVariable_2 - This is a valid identifier as it follows the rules.

Therefore, the correct answer is Option B: 2ndVariable.
9
Which of the following is a value type in C#?
Discuss
Answer & Solution
Answer: Option A
Solution:
Explanation: The correct answer is A: int.
Value Types vs. Reference Types: In C#, data types are categorized into two main groups: value types and reference types.

Value Types:
* Value types directly store the data within their own memory space.
* When you copy a value type variable, you are creating a completely independent copy of the data.
* Examples of value types include: int, float, bool, char, struct, and enum.

Reference Types:
* Reference types store a *reference* (or pointer) to the memory location where the actual data is stored.
* When you copy a reference type variable, you are only copying the reference, not the data itself. Both variables will then point to the same location in memory.
* Examples of reference types include: string, class, object, arrays, and interfaces.

Why the other options are incorrect:
* B: string - Strings are reference types in C#.
* C: class - Classes are used to define objects, and they are reference types.
* D: object - 'object' is the base class for all types in C#, and it is a reference type.
10
Which symbol is used to begin a single-line comment in C#?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board