C MCQ Quiz Hub

Choose a topic to test your knowledge and improve your C skills

Which of these can be overloaded?





✅ Correct Answer: 3

Number of constructors a class can define of ?





✅ Correct Answer: 3

Correct statement about constructors in C#.NET is ?





✅ Correct Answer: 4

Constructors are used to





✅ Correct Answer: 3

To overload a method which of the following statement is false?





✅ Correct Answer: 1

What is return type of constructors?





✅ Correct Answer: 3

Which method have same name as that of its class?





✅ Correct Answer: 3

Which of following statement are correct about functions?





✅ Correct Answer: 1

Which of the following statements are correct about an ArrayList collection thatimplements the IEnumerable interface? 1. The ArrayList class contains an inner class that implements the IEnumerator interface. 2. An ArrayList Collection cannot be accessed simultaneously by different threads. 3. The inner class of ArrayList can access ArrayList class's members. 4. To access members of ArrayList from the inner class, it is necessary to pass ArrayList class's reference to it. 5. Enumerator's of ArrayList Collection can manipulate the array.





✅ Correct Answer: 2

How many enumerators will exist if four threads are simultaneously working on an ArrayList object?





✅ Correct Answer: 4

In which of the following collections is the Input/Output index-based? 1. Stack 2. Queue 3. BitArray 4. ArrayList 5. HashTable





✅ Correct Answer: 2

Which of the following statements are correct about the Stack collection? 1. It can be used for evaluation of expressions. 2. All elements in the Stack collection can be accessed using an enumerator. 3. It is used to maintain a FIFO list. 4. All elements stored in a Stack collection must be of similar type. 5. Top-most element of the Stack collection can be accessed using the Peek() method.





✅ Correct Answer: 3

Which of the following is the correct way to access all elements of the Queue collection created using the C#.NET code snippet given below? Queue q = new Queue(); q.Enqueue("Sachin"); q.Enqueue('A'); q.Enqueue(false); q.Enqueue(38); q.Enqueue(5.4)





✅ Correct Answer: 1

Which of the following statements are correct about the delegate declaration given below? delegate void del(int i); 1. On declaring the delegate a class called del will get created. 2. The signature of del need not be same as the signature of the method that we intend to call using it. 3. The del class will be derived from the MulticastDelegate class. 4. The method that can be called using del should not be a static method. 5. The del class will contain a one-argument constructor and an lnvoke() method





✅ Correct Answer: 2

Suppose a Generic class called SortObjects is to be made capable of sorting objects of any type (Integer, Single, Byte etc.). Which of the following programming constructs should be used to implement the comparison function?





✅ Correct Answer: 4

What is a delegate?





✅ Correct Answer: 1

Which of the following is included in Visual Studio IDE?





✅ Correct Answer: 4

Which of the following is true about dispose() method?





✅ Correct Answer: 1

Button class derives from





✅ Correct Answer: 3

Which namespace includes most of the Control classes for developing Windows applications?





✅ Correct Answer: 4

Which of the Control objects is viewed as a container that can hold other objects when you design a Windows application?





✅ Correct Answer: 4

When an instance method declaration includes the abstract modifier, the method is said tobe an ______.





✅ Correct Answer: 1

The theory of _____ implies that user can control the access to a class, method, orvariable.





✅ Correct Answer: 2

Inheritance is ______ in nature.





✅ Correct Answer: 3

The point at which an exception is thrown is called the _______





✅ Correct Answer: 4

In C#, having unreachable code is always an _____.





✅ Correct Answer: 3

C# treats the multiple catch statements like cases in a _____________ statement.





✅ Correct Answer: 2

C# supports a technique known as________, which allows a method to specify explicitlythe name of the interface it is implementing.





✅ Correct Answer: 3

The reason that C# does not support multiple inheritances is because of ______.





✅ Correct Answer: 2

_______ is a set of devices through which a user communicates with a system using interactive set of commands.





✅ Correct Answer: 1

Exponential formatting character (‘E’ or ‘e’) converts a given value to string in the form of _______.





✅ Correct Answer: 1

The ______ are the Graphical User Interface (GUI) components created for web basedinteractions..





✅ Correct Answer: 2

In Microsoft Visual Studio, ______ technology and a programming language such as C#is used to create a Web based application.





✅ Correct Answer: 4

The controls available in the tool box of the ______ are used to create the user interface of a web based application.





✅ Correct Answer: 1

Web Forms consists of a _______ and a _________ .





✅ Correct Answer: 1

The ______ parentheses that follow _____ indicate that no information is passed to Main().





✅ Correct Answer: 3

The scope of a variable depends on the ____________ and _________.





✅ Correct Answer: 2

Which of the following statements is correct about the C#.NET code snippet given below?class Student s1, s2; // Here 'Student' is a user-defined class. s1 = new Student(); s2 = new Student();





✅ Correct Answer: 3

Which of the following can be facilitated by the Inheritance mechanism? 1 Use the existing functionality of base class. 2 Overrride the existing functionality of base class. 3 Implement new functionality in the derived class. 4 Implement polymorphic behaviour. 5 Implement containership.





✅ Correct Answer: 1

Which of the following should be used to implement a 'Has a' relationship between twoentities?





✅ Correct Answer: 3

Which of the following should be used to implement a 'Like a' or a 'Kind of' relationshipbetween two entities?





✅ Correct Answer: 4

How can you prevent inheritance from a class in C#.NET ?





✅ Correct Answer: 3

A class implements two interfaces each containing three methods. The class contains no instance data. Which of the following correctly indicate the size of the object created from this class?





✅ Correct Answer: 2

Which of the following statements is correct about Interfaces used in C#.NET?





✅ Correct Answer: 2

Which of the following statements is correct about an interface used in C#.NET?





✅ Correct Answer: 1

Which of the following statements is correct about an interface?





✅ Correct Answer: 3

Databases store information in records, fields and:





✅ Correct Answer: 4

Each data provider class is grouped and accessible through its:





✅ Correct Answer: 1

In Visual Studio, the tool that enables you to connect to a database and automatically populate a dataset object using a TableAdapter object is the ___________wizard:





✅ Correct Answer: 1

In XML, a document is a hierarchy of





✅ Correct Answer: 2

Which of the following namespace contains the LINQ to XML?





✅ Correct Answer: 3

LINQ to SQL works with





✅ Correct Answer: 3

A connection string contains





✅ Correct Answer: 2

To avoid writing additional SQL statements to update a live database, you instantiate an object of which class?





✅ Correct Answer: 1

The following namespaces (System.Data.OleDB, System.Data.SqlClient, System.Data.Odbc, System.Data.OracleClient) include classes for different:





✅ Correct Answer: 1

Which of the following is a definition of a database?





✅ Correct Answer: 1

A computer application for managing databases and pulling together data to generate reports and make decisions is known as a(n)





✅ Correct Answer: 4

Which of the following characterizes the relational model for databases?





✅ Correct Answer: 2

A field is a





✅ Correct Answer: 3

Forms and reports, used for entering and editing records, and for generating useful information in reports are





✅ Correct Answer: 4