Exam 2: C Programming: Data Types, Constructors, Inheritance, and Exception Handling
Exam 1: .NET Framework and C Programming39 Questions
Exam 2: C Programming: Data Types, Constructors, Inheritance, and Exception Handling40 Questions
Exam 3: C Programming: Collections, Delegates, and Object-Oriented Concepts39 Questions
Exam 4: C Programming: Database and ADO.NET38 Questions
Select questions type
Which of the following is NOT an Integer?
Free
(Multiple Choice)
4.7/5
(38)
Correct Answer:
A
The methods that have the same name, but different parameter lists and different definitions is called______.
Free
(Multiple Choice)
4.9/5
(28)
Correct Answer:
A
Which of the following is the correct ways to set a value 3.14 in a variable pi such that it cannot be modified?
(Multiple Choice)
4.9/5
(36)
Which of the following statements are correct?1. Instance members of a class can be accessed only through an object of that class.2. A class can contain only instance data and instance member function.3. All objects created from a class will occupy equal number of bytes in memory.4. A class can contain Friend functions.5. A class is a blueprint or a template according to which objects are created.
(Multiple Choice)
4.8/5
(27)
Which of the following is the correct output for the C#.NET code snippet given below? Console.WriteLine(13 / 2 + " " + 13 % 2);
(Multiple Choice)
4.9/5
(41)
The C# provides special methods known as _____ methods to provide access to data members.
(Multiple Choice)
4.7/5
(43)
Which of the following statements is correct about constructors?
(Multiple Choice)
4.8/5
(44)
______ parameters are used to pass results back to the calling method.
(Multiple Choice)
4.8/5
(36)
Which of the following statements are correct about the C#.NETcode snippet given below?if (age > 18 && no < 11) a = 25;1. The condition no < 11 will be evaluated only if age > 18 evaluates to True.2. The statement a = 25 will get executed if any one condition is True.3. The condition no < 11 will be evaluated only if age > 18 evaluates to False.4. The statement a = 25 will get executed if both the conditions are True.5. && is known as a short circuiting logical operator.
(Multiple Choice)
4.8/5
(30)
_______ variables are visible only in the block they are declared.
(Multiple Choice)
4.9/5
(42)
If s1 and s2 are references to two strings, then which of the following is the correct way to compare the two references?
(Multiple Choice)
4.7/5
(38)
What will be the output of the following code snippet when it is executed?int x = 1;float y = 1.1f;short z = 1;Console.Write.Line((float) x + y * z - (x += (short) y));
(Multiple Choice)
4.7/5
(37)
Which of the following statements are correct?1. We can assign values of any type to variables of type object.2. When a variable of a value type is converted to object, it is said to be unboxed.3. When a variable of type object is converted to a value type, it is said to be boxed.4. Boolean variable cannot have a value of null.5. When a value type is boxed, an entirely new object must be allocated and constructed.
(Multiple Choice)
4.9/5
(32)
Which of the following statements are correct about data types?1. If the integer literal exceeds the range of byte, a compilation error will occur.2. We cannot implicitly convert non-literal numeric types of larger storage size to byte.3. Byte cannot be implicitly converted to float.4. A char can be implicitly converted to only int data type. 5. We can cast the integral character codes.
(Multiple Choice)
4.8/5
(34)
Which of the following statements is correct about an Exception?
(Multiple Choice)
4.8/5
(33)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)