C# Console IO and Stream Classes Mcqs
Our collections of Multiple choice questions and answers focuses on study of C# Console IO and Stream Classes. These questions are chosen from a collection of most authoritative and best reference books on C# Console IO and Stream Classes. Our aim is to prepare an individual for competitive exams like NTS, GAT, ECAT, University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate C# Console IO and Stream Classes comprehensively.
C# Programming Mcqs
- Arrays and Strings mcqs
- Classes and Objects Mcqs
- Collections & Mathematical Functions Mcqs
- Console IO and Stream Classes Mcqs
- Control Instructions Mcqs
- Data Types,Variables & Operators Mcqs
- Delegates and Generics Mcqs
- Functions and Subroutines Mcqs
- Indexers and Exceptions Mcqs
- Interfaces,Inheritance & Polymorphism Mcqs
- Miscellaneous Topics Mcqs
- Namespaces and Preprocessors Mcqs
Computer MCQS
Sciences MCQS
2.
To apply an attribute to an Assembly, the correct way of implementation is?
[AssemblyInfo: AssemblyDescription (“Csharp”)].
[assembly: AssemblyDescription(“Csharp”)].
[AssemblyDescription(“Csharp”)].
[AssemblyDescription(“Csharp”)]
Answer & Solution
[assembly: AssemblyDescription(“Csharp”)].
No Solution for this Answer..! Report or Discus this Question
3.
The correct method to pass parameter to an attribute is?
By name
By address
By value
By reference
4.
Which among the following is the correct form of applying an attribute?
{
}
(Serializable())class sample
{
}
[Serializable()] class sample
{
}
None of the mentioned
Answer & Solution
[Serializable()] class sample
{
}
No Solution for this Answer..! Report or Discus this Question
5.
Which among the following cannot be a target for a custom attribute?
Enum
Event
Interface
Namespace
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
6.
Select the correct statement about Attributes used in C#.NET?
The CLR can change the behaviour of the code depending on attributes applied to it
If a bugFixAttribute is to recieve three paramteres, then the BugFixAttribute class should implement a zero arguement constructor
To create a custom attribute we need to create a custom attribute structure and derive it from System.Attribute
None of the mentioned
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
7.
The correct way to apply the custom attribute called Employer which receives two arguements – name of the employee and employeeid is?
Custom attribute can be applied to an assembly
[assembly : Employer(“Hanna”,employeeid.one)].
[ Employer(“Hanna”, employeeid.second)] class employee
{
}
All of the mentioned
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
8.
Which of the following is the correct statement about inspecting an attribute in C#.NET?
An attribute can be inspected at link time
An attribute can be inspected at design time
An attribute can be inspected at run time
None of the mentioned
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
9.
Attributes could be applied to
Method
Class
Assembly
All of the mentioned
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
10.
The [Serializable()] attributes gets inspected at:
Compile time
Run time
Design time
Linking time
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
11.
Which of the classes provide the operation of reading from and writing to the console in C#.NET?
System.Array
System.Output
System.ReadLine
System.Console
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
12.
Which of the given stream methods provide access to the output console by default in C#.NET?
Console.In
Console.Out
Console.Error
All of the mentioned
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
13.
Which of the given stream methods provide the access to the input console in C#.NET?
Console.Out
Console.Error
Console.In
All of the mentioned
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
14.
The number of input methods defined by the stream method Console.In in C#.NET is?
4
3
2
1
15.
Select the correct methodS provided by Console.In?
Read(), ReadLine()
ReadKey(), ReadLine()
Read(), ReadLine(), ReadKey()
ReadKey(), ReadLine()
Answer & Solution
No Solution for this Answer..! Report or Discus this Question