TVS Previous Years Solved Sample Placement Papers
-
Is C++ an alias of C#?
A: Yes
B: No
Ans: B -
What is the extension of a C# language file?
A: .c
B: .cpp
C: .cs
D: .csp
Ans: C -
CLR stands for ___.
A: Common Type System
B: Common Language Specification
C: Common Language Runtime
D: Java Virtual Machine
Ans: C -
What is the value of z?
int z, x = 5, y = -10, a = 4, b = 2; z = x++ - --y * b / a;
A: 5
B: 6
C: 10
D: 11
Ans: [Your Answer] -
Every C# statement is terminated by ___.
A: Colon (:)
B: Semicolon (;)
C: Comma (,)
D: Dot (.)
Ans: BExplanation:
Every C# statement is terminated by a semicolon (;).
-
Is C# programming language case-sensitive?
A: Yes
B: No
Ans: AExplanation:
Yes, C# programming language is case-sensitive.
-
In C#, a single-line comment starts with ___.
A: Two forward slashes (//)
B: Two backward slashes (\\)
C: A hash character (#)
D: A dollar character ($)
Ans: AExplanation:
In C#, a single-line comment starts with two forward slashes (//).
-
In C#, the multi-line comments are placed within the ___.
A: // and //
B: \\ and //
C:
D: /* and */
Ans: DExplanation:
In C#, the multi-line comments are placed within the /* and */.
-
What is the correct syntax to declare a variable in C#?
A: type variableName = value;
B: type variableName;
C: variableName as type = value;
D: Both A and B
Ans: DExplanation:
Both of the above syntaxes can be used to declare a variable:
type variableName = value;
- It defines the type and assigns the valuetype variableName;
- It defines the type only
-
Which data type is used to store text value in C#?
A: text
B: txt
C: string
D: str
Ans: CExplanation:
The string data type is used to store text values in C#.
-
Which C# keyword is used to define a constant?
A: define
B: fixed
C: constant
D: const
Ans: DExplanation:
The
const
keyword is used to define a constant in C#. -
What is the correct syntax to define a C# constant?
A: const type constant_name;
B: const type constant_name = value;
C: const constant_name as type;
D: const constant_name as type = value;
Ans: BExplanation:
The correct syntax to define a C# constant is:
const type constant_name = value;
Note: A const field requires a value to be provided.
-
Which is not a valid C# data type?
A: long
B: int
C: float
D: complex
Ans: DExplanation:
There is no
complex
data type in C#. -
Which is the correct order for implicit type conversion to convert a smaller to a larger type in C#?
A: char -> int -> long -> float -> double
B: bool -> char -> int -> long -> float -> double
C: char -> int -> float -> long -> double
D: bool -> char -> int -> long -> double -> float
Ans: AExplanation:
The implicit type conversion is done in the following order:
char -> int -> long -> float -> double
. -
The link field of the last node contains:
A: NULL
B: Head
C: Tail
D: None
Ans: A -
In a linked list, the link field of every node contains:
A: Data of the node
B: Data of the next node
C: Address of the last node
D: Address of the next node
Ans: D -
In a doubly linked list, which node points to the address of the previous node?
A: Info
B: Frow
C: Back
D: Head
Ans: C -
Which operation is not possible in a linked list?
A: Sorting
B: Searching
C: Merging
D: Inserting
Ans: C -
Which of the following function declaration is/are incorrect?
A: int Sum(int a, int b = 2, int c = 3);
B: int Sum(int a = 5, int b);
C: int Sum(int a = 0, int b, int c = 3);
D: Both B and C are incorrect.
E: All are correct.
Ans: E -
You can use C++ as a procedural, as well as an object-oriented, language
A: TRUE
B: FALSE
Ans: A -
The address of a variable temp of type float is
A: *temp
B: &temp
C: float& temp
D: float temp&
Ans: B