Dive into the 'Software Fundamentals Ultimate Quiz! Trivia' to test and enhance your understanding of essential programming concepts using C#. This quiz covers algorithms, array manipulation, method declarations, and control structures, crucial for any budding software developer.
C#
Visual Basic
Common Intermediate Language
C++
Rate this question:
Numbers[0]
Numbers[1]
Numbers[2]
Numbers[3]
Rate this question:
10
11
12
13
Rate this question:
Void
Private
Int
String
Rate this question:
Case
Break
If-else
Switch
Rate this question:
While
For
Foreach
Do-while
Rate this question:
Change the code in line 01 to int count = 1;
Change the code in line 02 to: while (count == 5)
Change the code in line 02 to while (count >= 5)
Change the code in line 05 to ++count;
Rate this question:
19
13
20
14
Rate this question:
Int
Float
Double
Long
Rate this question:
Inside the try block, before the first catch block
Inside the catch block that catches SqlException objects
Inside the catch block that catches Exception objects
Inside the finally block
Rate this question:
Try { bool success = ApplyPicardoRotation(100, 0); // additional code lines here } catch(DivideByZeroException dbze) { //exception handling code } catch(ArithmeticException ae) { //exception handling code } catch(OverflowException oe) { //exception handling code }
Try { bool success = ApplyPicardoRotation(100, 0); // additional code lines here } catch(DivideByZeroException dbze) { //exception handling code } catch(Exception e) { //exception handling code } catch(OverflowException oe) { //exception handling code }
Try { bool success = ApplyPicardoRotation(100, 0); // additional code lines here } catch(DivideByZeroException dbze) { //exception handling code } catch(NotFiniteNumberException nfne) { //exception handling code } catch(OverflowException oe) { //exception handling code } catch(ArithmeticException ae) { //exception handling code }
Try { bool success = ApplyPicardoRotation(100, 0); // additional code lines here } catch(DivideByZeroException dbze) { //exception handling code } catch(NotFiniteNumberException nfne) { //exception handling code } catch(Exception e) { //exception handling code } catch(ArithmeticException ae) { //exception handling code }
Rate this question:
Public static int Factorial(int n) { if (n == 0) { return 1; } else { return n * Factorial(n - 1); } }
Public static int Factorial(int n) { if (n == 0) { return 1; } else { return (n – 1) * Factorial(n); } }
Public static int Factorial(int n) { if (n == 0) { return n; } else { return Factorial(n - 1); } }
Public static int Factorial(int n) { return n * Factorial(n - 1); }
Rate this question:
5
4
3
2
Rate this question:
0
1
2
3
Rate this question:
The while statement
The for statement
The foreach statement
The do-while statement
Rate this question:
After each case, add the following code line: break;
After each case, add the following code line: continue;
After each case, add the following code line: goto default;
After each case, add the following code line: return;
Rate this question:
5 percent
10 percent
15 percent
20 percent
Rate this question:
720
120
24
6
Rate this question:
While
For
Foreach
Do-while
Rate this question:
Private
Protected
Internal
Public
Rate this question:
Public double InitFields(double l, double w) { length = l; width = w; return length * width; }
Public void InitFields(double l, double w) { length = l; width = w; }
Public void InitFields(double l) { length = l; width = l; return; }
Public double InitFields(double l, double w) { length = l; width = w; }
Rate this question:
Abstract
Virtual
New
Overrides
Rate this question:
Sealed
Abstract
Private
Internal
Rate this question:
Add the print functionality to a base class with the public access modifier.
Have all classes inherit from an abstract base class and override the base-class method to provide their own print functionality.
Have all the classes inherit from a base class that provides the print functionality.
Create a common interface that all classes implement.
Rate this question:
Method
Property
Event
Delegate
Rate this question:
Create a static method in the Product class to initialize data members.
Create a constructor in the Product class to initialize data members.
Create a static property in the Product class to initialize data members.
Create an event in the Product class to initialize data members.
Rate this question:
Class Sphere : Shape { public override void Area() { // additional code ... } }
Class Sphere : Shape { public new void Area() { // additional code ... } }
Class Sphere : Shape { public virtual void Area() { // additional code ... } }
Class Sphere : Shape { public static void Area() { // additional code ... } }
Rate this question:
Public int CompareTo(object obj) { Polygon target = (Polygon)obj; double diff = this.GetArea() - target.GetArea(); if (diff == 0) return 0; else if (diff > 0) return 1; else return -1; }
Public int CompareTo(object obj) { Polygon target = (Polygon)obj; double diff = this.GetArea() - target.GetArea(); if (diff == 0) return 1; else if (diff > 0) return -1; else return 0; }
Public int CompareTo(object obj) { Polygon target = (Polygon)obj; if (this == target) return 0; else if (this > target) return 1; else return -1; }
Public int CompareTo(object obj) { Polygon target = (Polygon)obj; if (this == target) return 1; else if (this > target) return -1; else return 0; }
Rate this question:
Polygon p = (Polygon) o;
Polygon p = o is Polygon;
Polygon p = o as Polygon;
Polygon p = (o != null) ? o as Polygon : (Polygon) o;
Rate this question:
Handler = new PolygonHandler(CalculateArea);
Handler = CalculateArea;
Handler += CalculateArea;
Handler -= CalculateArea;
Rate this question:
Namespace
Override
Delegate
Class
Rate this question:
10
20
30
40
Rate this question:
10
20
30
40
Rate this question:
You can use the this keyword reference with a static method or property.
Only one copy of a static field is shared by all instances of a class.
Static members of a class can be used only after an instance of a class is created.
The static keyword is used to declare members that do not belong to individual objects but to a class itself.
Rate this question:
A class is a concrete instance of an object.
A class defines the template for an object.
A class is a definition of a new data type.
A constructor is used to initialize the data members of the object.
Rate this question:
Public
Protected
Private
Internal
Rate this question:
Virtual
Sealed
Interface
Abstract
Rate this question:
Rectangle r = (Rectangle) o;
Rectangle r = o;
Rectangle r = o as Rectangle;
Rectangle r = o is Rectangle;
Rate this question:
Encapsulation
Abstraction
Polymorphism
Inheritance
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.