CuriousTab
CuriousTab
Home
Aptitude
Computer
C Programming
C# Programming
C++ Programming
Database
Java Programming
Networking
Engineering
Biochemical Engineering
Biochemistry
Biotechnology
Chemical Engineering
Civil Engineering
Computer Science
Digital Electronics
Electrical Engineering
Electronics
Electronics and Communication Engineering
Mechanical Engineering
Microbiology
Technical Drawing
GK
Current Affairs
General Knowledge
Reasoning
Data Interpretation
Logical Reasoning
Non Verbal Reasoning
Verbal Ability
Verbal Reasoning
Exams
AIEEE
Bank Exams
CAT
GATE
IIT JEE
TOEFL
Jobs
Analyst
Bank Clerk
Bank PO
Database Administrator
IT Trainer
Network Engineer
Project Manager
Software Architect
Discussion
Home
‣
C# Programming
‣
Classes and Objects
See What Others Are Saying!
Question
Which of the following statements is correct?
Options
A. Procedural Programming paradigm is different than structured programming paradigm.
B. Object Oriented Programming paradigm stresses on dividing the logic into smaller parts and writing procedures for each part.
C. Classes and objects are corner stones of structured programming paradigm.
D. Object Oriented Programming paradigm gives equal importance to data and the procedures that work on the data.
E. C#.NET is a structured programming language.
Correct Answer
Object Oriented Programming paradigm gives equal importance to data and the procedures that work on the data.
More questions
1. Which of the following CANNOT be used as an underlying datatype for an
enum
in C#.NET?
Options
A.
byte
B.
short
C.
float
D.
int
Show Answer
Scratch Pad
Discuss
Correct Answer:
float
2. Which of the following statements is correct?
Options
A. There is one garbage collector per program running in memory.
B. There is one common garbage collector for all programs.
C. An object is destroyed by the garbage collector when only one reference refers to it.
D. We have to specifically run the garbage collector after executing Visual Studio.NET.
Show Answer
Scratch Pad
Discuss
Correct Answer: There is one common garbage collector for all programs.
3. Which of the following statements is correct?
Options
A. A struct never declares a
default
constructor.
B. All value types in C# inherently derive from
ValueType
, which inherits from
Object
.
C. A struct never declares a
default
destructor.
D. In C#, classes and structs are semantically same.
Show Answer
Scratch Pad
Discuss
Correct Answer: All value types in C# inherently derive from
ValueType
, which inherits from
Object
.
4. Which of the following statements are correct about Structures used in C#.NET?
A Structure can be declared within a procedure.
Structs can implement an
interface
but they cannot inherit from another
struct
.
struct members cannot be declared as
protected
.
A Structure can be empty.
It is an error to initialize an instance field in a
struct
.
Options
A. 1, 2, 4
B. 2, 3, 5
C. 2, 4
D. 1, 3
Show Answer
Scratch Pad
Discuss
Correct Answer: 2, 3, 5
5. Which of the following statements is correct about properties used in C#.NET?
Options
A. A property can simultaneously be read only or write only.
B. A property can be either read only or write only.
C. A write only property will have only get accessor.
D. A write only property will always return a value.
Show Answer
Scratch Pad
Discuss
Correct Answer: A property can be either read only or write only.
6. Which of the following statements are correct about data types?
Each value type has an implicit default constructor that initializes the default value of that type.
It is possible for a value type to contain the
null
value.
All value types are derived implicitly from
System.ValueType
class.
It is not essential that local variables in C# must be initialized before being used.
Variables of reference types referred to as objects and store references to the actual data.
Options
A. 1, 3, 5
B. 2, 4
C. 3, 5
D. 2, 3, 4
Show Answer
Scratch Pad
Discuss
Correct Answer: 1, 3, 5
7. Which of the following statements are correct about datatypes in C#.NET?
Every datatype is either a value type or a reference type.
Value types are always created on the heap.
Reference types are always created on the stack.
Mapping of every value type to a type in Common Type System facilitates Interoperability in C#.NET.
Every reference type gets mapped to a type in Common Type System.
Options
A. 1, 3
B. 2, 5
C. 1, 4
D. 3, 4
Show Answer
Scratch Pad
Discuss
Correct Answer: 1, 4
8. Which of the following statements are correct?
The conditional operator
(?:)
returns one of two values depending on the value of a Boolean expression.
The
as
operator in C#.NET is used to perform conversions between compatible reference types.
The
&*
operator is also used to declare pointer types and to dereference pointers.
The
->
operator combines pointer dereferencing and member access.
In addition to being used to specify the order of operations in an expression, brackets
[ ]
are used to specify casts or type conversions.
Options
A. 1, 2, 4
B. 2, 3, 5
C. 3, 4, 5
D. 1, 3, 5
E. None of these
Show Answer
Scratch Pad
Discuss
Correct Answer: 1, 2, 4
9. Once applied which of the following CANNOT inspect the applied attribute?
Options
A. CLR
B. Linker
C. ASP.NET Runtime
D. Visual Studio.NET
E. Language compilers
Show Answer
Scratch Pad
Discuss
Correct Answer: Linker
10. Which of the following statements are correct about the following code snippet?
int a = 10; int b = 20; bool c; c = !(a > b);
There is no error in the code snippet.
An error will be reported since
!
can work only with an
int
.
A value
1
will be assigned to
c
.
A value
True
will be assigned to
c
.
A value
False
will be assigned to
c
.
Options
A. 1, 3
B. 2, 4
C. 4, 5
D. 1, 4
E. None of these
Show Answer
Scratch Pad
Discuss
Correct Answer: 1, 4
Comments
There are no comments.
Enter a new Comment
Save
More in C# Programming:
Arrays
Attributes
Classes and Objects
Collection Classes
Constructors
Control Instructions
Datatypes
Delegates
Enumerations
Exception Handling
Functions and Subroutines
Generics
Inheritance
Interfaces
Namespaces
.NET Framework
Operators
Polymorphism
Properties
Strings
Structures