Home » Aptitude Questions and Answers » C# Aptitude Questions and Answers

C# Class & Object Aptitude Questions and Answers | Set 1

C# Class & Object Aptitude Questions | Set 1: This section contains aptitude questions and answers on C# Class & Object.
Submitted by Nidhi, on April 12, 2020

1) There are following statements are given below, which of them are correct about classes in C#?
  1. Class is a template that encapsulates data members and methods together.
  2. In C#, a class is a predefined keyword.
  3. We can use only predefine classes.
  4. A class occupies a fixed 10-byte memory space.

Options:

  1. Only B
  2. Only C
  3. A and B
  4. Only D

2) There are following statements are given below, which of them are correct about the programming paradigm?
  1. C#.NET supports a structured programming paradigm.
  2. C#.NET supports an object-oriented programming paradigm.
  3. The procedural programming paradigm is not the same as a structured programming paradigm.
  4. In Object-Oriented programming, methods are more important than data.

Options:

  1. Only A
  2. Only B
  3. C and D
  4. Only D

3) There are following statements are given below, which of them are correct in C#.NET?
  1. A class in C#.NET can contain only an instance data member and instance methods.
  2. In C#.NET we can create friend function.
  3. A class is a blueprint by which we can create objects of the class.
  4. In C#.NET, Instance members of a class can only be accessed using the object of the class.

Options:

  1. Only A
  2. Only B
  3. Only C
  4. C and D

4) There are following statements are given below, which of them are correct in C#.NET?
  1. Objects are created with a default name, we cannot assign a name to the objects.
  2. Small size objects are created in the heap segment.
  3. Class is a reference type.
  4. We can create user define classes to implement the functionality.

Options:

  1. Only A
  2. Only B
  3. A and B
  4. C and D

5) There are following statements are given below, which of them are correct in C#.NET?
  1. In C#.NET by default data members of the class are private.
  2. In C#.NET by default data members of the class are public.
  3. In C#.NET by default methods of the class are public.
  4. In C#.NET private methods can access public methods of the same class.

Options:

  1. Only A
  2. Only B
  3. A and D
  4. B and C






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.