wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

RECAP- .Net Programming

Total questions: 77

Worksheet time: 52mins

Name
Class
Date
1.

Which would be the best way to create a variable to store a real number

a)

Dim r as real

b)

Dim r as decimal

c)

dim number as real

d)

dim number as decimal

2.

which of the following is correct to find if a number n is between 1 and 5 inclusive

a)

IF n <=1 and >=5

b)

IF n > 1 or n < 5

c)

IF n >=1 or n <= 5

d)

IF n >=1 and n <=5

3.

An algorithm is...

a)

A sequence of step by step instructions to complete a task

b)

Breaking a problem down into smaller problems

c)

Removing the unnecessary detail from a problem

d)

A program written to solve a problem

4.

Decomposition is ...

a)

A sequence of step by step instructions to complete a task

b)

Breaking a problem down into smaller problems

c)

Removing the unnecessary detail from a problem

d)

A program written to solve a problem

5.

Abstraction is...

a)

A sequence of step by step instructions to complete a task

b)

Breaking a problem down into smaller problems

c)

Removing the unnecessary detail from a problem

d)

A program written to solve a problem

6.

Which algorithm would be best to search for a value in a list of 1,000,000 ordered numbers

a)

Bubble search

b)

Binary sort

c)

Binary search

d)

Linear search

7.

Which algorithm would be best to search for a number in a list of 1,000,000 random numbers

a)

Linear sort

b)

Linear search

c)

Merge search

d)

Binary search

8.

Which algorithm would sort 1,000,000 random numbers in the least time

a)

Merge search

b)

Bubble sort

c)

Merge sort

d)

Bogosort

9.

Why would a programmer use bubble sort instead of merge sort

a)

It takes less time to sort numbers

b)

It is easier to program

c)

The efficiency gains from merge sort are negligible for small sets of values

d)

it is a good way to show off their programming skills

10.

Which is not a valid VB data type

a)

Integer

b)

Bool

c)

Char

d)

String

11.

What is the correct ending of a FOR loop in VB

a)

}

b)

ENDFOR

c)

NEXT

d)

)

12.

Which is the correct way to start a for loop to loop 10 times in VB

a)

FOR (i=1;i<=10;i++)

b)

FOR i = 0 to 10

c)

FOR i = 1 to 10 step 2

d)

For i = 1 to 10

13.

How do you declare a constant in VB

a)

Const pi As Integer = 3.14

b)

Constant pi as Integer = 3.14

c)

Dim pi as constant = 3.14

d)

Dim pi as Constant Integer = 3.14

14.

What is used in VB to find the remainder of dividing a by b

a)

a \ b

b)

a % b

c)

a div b

d)

a mod b

15.

How would you integer divide a by b

a)

a \ b

b)

a / b

c)

a div b

d)

a mod b

16.

Which one of the following is a 2D array in VB

a)

Dim a(1,2) as string

b)

dim a[1,2] as string

c)

dim a(2) as string

d)

dim a[2] as string

17.

Which is the correct way in VB to create a record called Town

a)

Record Town

b)

Structure Town

c)

Record Structure Town

d)

Town Structure

18.

in VB how would you take a user input and store it in a variable userInput

a)

userInput = Console.Readline()

b)

userInput = Console.ReadKey()

c)

userInput = Console.Read()

d)

userInput = Input

19.

In VB how would you find the length of a string with the identifier myString

a)

myString(length)

b)

myString.Len

c)

Length.myString

d)

myString.Length

20.

in VB how would you join together an integer with the identifier n and a string with the identifier myString

a)

n + myString

b)

n & myString

c)

n AND myString

d)

n.MyString

21.

in VB how would you convert myString to lower case

a)

Lower(myString)

b)

myString.Lower()

c)

myString.ToLower()

d)

Convert.ToLower(myString)

22.

What is not needed in a Function in VB

a)

Function

b)

End Function

c)

Sub

d)

Return

23.

How many parameters are there

Function getMyResult(input, n, score)

a)

1

b)

2

c)

3

d)

4

24.

What type of test data would test a value that should be allowed as an input into a program

a)

Correct

b)

Right

c)

Valid

d)

normal

25.

What type of test data would test a value that should be rejected as an input into a program

a)

Wrong

b)

Erroneous

c)

invalid

d)

incorrect

26.

What type of test data would the edges of valid data

a)

Edge

b)

Boundary

c)

Extreme

d)

outside

27.

Which type of error would stop the program from running?

a)

syntax error

b)

logic error

28.

If a < 1 AND a > 10 Then

this code is not correct, what type of error is it

a)

Syntax error

b)

Logic error

29.

Which error is harder to find

a)

Syntax error

b)

Logic error

30.

A function must ...

a)

contain parameters

b)

return a value

c)

declare its own variables

d)

have an output

31.

A subroutine that does not have to return a value is ....

a)

a procedure

b)

a function

32.

In VB a procedure is written as ...

a)

procedure myProcedure()

b)

subroutine myProcedure()

c)

sub myProcedure()

d)

function myProcedure()

33.

What is Visual Basic .NET?

a)

A programming language used to create Windows desktop applications.

b)

A database management system.

c)

A web development framework.

d)

A game development engine.

34.

Which tool is used to create a new Visual Basic .NET project?

a)

Visual Studio IDE

b)

SQL Server Management Studio

c)

Adobe Photoshop

d)

Eclipse IDE

35.

What is a variable in Visual Basic .NET?

a)

A named storage location in memory that can hold a value.

b)

A keyword used to define a new class.

c)

A method used to control program flow.

d)

A data structure used to store multiple values of the same type.

36.

How can you change the width of a form in Visual Basic .NET?

a)

Use the BackColor property of the form.

b)

Use the ForeColor property of the form.

c)

Use the Width property of the form.

d)

Use the Height property of the form.

37.

How can you change the font of a label in Visual Basic .NET?

a)

Use the Font property of the label.

b)

Use the ForeColor property of the label.

c)

Use the Width property of the label.

d)

Use the Height property of the label.

38.

How can you change the fore-color of a label in Visual Basic .NET?

a)

Use the Font property of the label.

b)

Use the ForeColor property of the label.

c)

Use the Width property of the label.

d)

Use the Height property of the label.

39.

How can you change the text property of a textbox in Visual Basic .NET?

a)

Use the Text property of the textbox.

b)

Use the Font property of the textbox.

c)

Use the ForeColor property of the textbox.

d)

Use the BackColor property of the textbox.

40.

How can you display a message to the user in Visual Basic .NET?

a)

Use the MessageBox.Show method.

b)

Use the Console.WriteLine method.

c)

Use the Debug.WriteLine method.

d)

Use the WriteLine method of a file.

41.

What is the purpose of string concatenation in Visual Basic .NET?

a)

To combine two or more strings into a single string.

b)

To separate a string into multiple substrings.

c)

To remove whitespace from the beginning and end of a string.

d)

To change the case of all characters in a string.

42.

How do you declare a variable in Visual Basic .NET?

a)

Using the var keyword.

b)

Using the dim keyword.

c)

Using the int keyword.

d)

Using the string keyword.

43.

A (a)   the set of codes in your application that handles communication between an end user interface and a database. 

44.

C# is , except

a)

Microsoft C# tool to build web application

b)

Dynamic Web Pages, usually connected to a Database.

c)

·open source, cross-platform version of ASP. (Platform solution for developing options)

d)

None of the above

45.

ASP stands for?

a)

active server platform

b)

active service platforms

c)

active server pages

d)

active service page

46.

(a)   is a pre-built structure that provides a foundation for creating applications.

47.

 is a software environment or framework that provides tools, libraries, and resources for developing and running software applications.

(a)  

48.

True or False: Dynamic Web Pages, usually connected to a Internet.

a)

True

b)

False

49.

is ASP.Net Core a Front End programming?

a)

True

b)

False

50.

is ASP.Net Core a Back End Programming?

a)

True

b)

False

51.

is ASP.Net Core a Full Stack Programming?

a)

True

b)

False

52.

handles page events and navigation between pages.

a)

Model

b)

View

c)

Controller

53.

manages the behavior of the Data.

a)

Model

b)

View

c)

Controller

54.

manage the display of the data

a)

Model

b)

View

c)

Controller

55.

(a)   is language neutral that supports more than 20 languages

56.

.NET is very similar to JAVA

a)

True

b)

False

57.

Who developed ASP.Net Core?

(a)  

58.

What is ASP.NET Core?

a)

A server-side web application framework

b)

A client-side JavaScript framework

c)

A database management system

d)

A front-end design tool

59.

Which of the following is a feature of ASP.NET Core?

a)

Cross-platform support

b)

Single language support

c)

Front-end rendering only

d)

Not open-source

60.

What is the use of middleware in ASP.NET Core?

a)

To manage client-side requests

b)

To handle database queries

c)

To define how HTTP requests are handled

d)

To create API endpoints

61.

Which programming languages can be used with ASP.NET Core?

a)

Java and PHP

b)

C# and F#

c)

Python and Ruby

d)

Swift and Kotlin

62.

What does the Razor View Engine do in ASP.NET Core?

a)

Manages server-side databases

b)

Renders JavaScript components

c)

Parses Razor markup and produces HTML responses

d)

Compiles C# code into machine code

63.

What is the purpose of the `Startup.cs` file in an ASP.NET Core project?

a)

To configure how the application starts

b)

To store user credentials

c)

To define routing for the application

d)

To run database migrations

64.

What does the term "cross-platform" mean in the context of ASP.NET Core?

a)

It can only run on Windows

b)

It can run on multiple operating systems

c)

It can only run on Linux

d)

It can run without a server

65.

What is Entity Framework Core in ASP.NET Core?

a)

A UI framework

b)

A front-end framework

c)

An ORM (Object-Relational Mapper)

d)

A CSS framework

66.

What does MVC stand for in ASP.NET Core MVC?

a)

Main View Controller

b)

Model View Controller

c)

Managed View Code

d)

Modular Visual Control

67.

What type of applications can be built using ASP.NET Core?

a)

Web APIs

b)

Web Apps

c)

Real-time apps

d)

All of the above

68.

What is the purpose of the `wwwroot` folder in an ASP.NET Core project?

a)

To store server-side code

b)

To store static files like CSS, JavaScript, and images

c)

To store configuration files

d)

To store database files

69.

What does the `.csproj` file manage in an ASP.NET Core ?

a)

The project's folder structure

b)

Project dependencies and configuration settings

c)

Database connection strings

d)

Client-side libraries

70.

What is a controller's role in an MVC-based ASP.NET Core application?

a)

To handle HTTP requests and return responses

b)

To manage static files

c)

To define the database schema

d)

To write client-side JavaScript

71.

How can you specify routes in an ASP.NET Core application using attribute routing?

a)

By modifying the `wwwroot` folder

b)

By adding attributes like `[Route]` to the controller methods

c)

By configuring `launchSettings.json`

d)

By modifying the `csproj` file

72.

What file extension is used for Razor views in ASP.NET Core?

a)

.html

b)

.razor

c)

.cshtml

d)

.xml

73.

Which of the following is the entry point of an ASP.NET Core application?

a)

HomeController.cs

b)

Program.cs

c)

appsettings.json

d)

wwwroot folder

74.

What is the default action method in a controller?

a)

Start()

b)

Load()

c)

Index()

d)

Init()

75.

From which version were .NET and .NET Core merged into a single platform?

a)

.NET 4.0

b)

.NET 5.0

c)

.NET 6.0

d)

.NET 7.0

76.

What is the main disadvantage of .NET compared to .NET Core ?

a)

.NET Framework is limited to running only on Windows

b)

.NET Framework has better performance than .NET Core

c)

.NET Framework supports cross-platform development

d)

.NET Framework is lightweight and optimized for cloud environments

77.

What is one key advantage of ASP.NET Core compared to other popular web frameworks like Django, Flask, or Ruby on Rails?

a)

ASP.NET Core provides better cross-platform support than other web frameworks

b)

ASP.NET Core offers built-in dependency injection and a highly modular architecture

c)

ASP.NET Core lacks community support compared to other web frameworks.

d)

ASP.NET Core is slower in performance compared to Django and Ruby on Rails.