Font size
WorksheetsRECAP- .Net Programming
Total questions: 77
Worksheet time: 52mins
Which would be the best way to create a variable to store a real number
Dim r as real
Dim r as decimal
dim number as real
dim number as decimal
which of the following is correct to find if a number n is between 1 and 5 inclusive
IF n <=1 and >=5
IF n > 1 or n < 5
IF n >=1 or n <= 5
IF n >=1 and n <=5
An algorithm is...
A sequence of step by step instructions to complete a task
Breaking a problem down into smaller problems
Removing the unnecessary detail from a problem
A program written to solve a problem
Decomposition is ...
A sequence of step by step instructions to complete a task
Breaking a problem down into smaller problems
Removing the unnecessary detail from a problem
A program written to solve a problem
Abstraction is...
A sequence of step by step instructions to complete a task
Breaking a problem down into smaller problems
Removing the unnecessary detail from a problem
A program written to solve a problem
Which algorithm would be best to search for a value in a list of 1,000,000 ordered numbers
Bubble search
Binary sort
Binary search
Linear search
Which algorithm would be best to search for a number in a list of 1,000,000 random numbers
Linear sort
Linear search
Merge search
Binary search
Which algorithm would sort 1,000,000 random numbers in the least time
Merge search
Bubble sort
Merge sort
Bogosort
Why would a programmer use bubble sort instead of merge sort
It takes less time to sort numbers
It is easier to program
The efficiency gains from merge sort are negligible for small sets of values
it is a good way to show off their programming skills
Which is not a valid VB data type
Integer
Bool
Char
String
What is the correct ending of a FOR loop in VB
}
ENDFOR
NEXT
)
Which is the correct way to start a for loop to loop 10 times in VB
FOR (i=1;i<=10;i++)
FOR i = 0 to 10
FOR i = 1 to 10 step 2
For i = 1 to 10
How do you declare a constant in VB
Const pi As Integer = 3.14
Constant pi as Integer = 3.14
Dim pi as constant = 3.14
Dim pi as Constant Integer = 3.14
What is used in VB to find the remainder of dividing a by b
a \ b
a % b
a div b
a mod b
How would you integer divide a by b
a \ b
a / b
a div b
a mod b
Which one of the following is a 2D array in VB
Dim a(1,2) as string
dim a[1,2] as string
dim a(2) as string
dim a[2] as string
Which is the correct way in VB to create a record called Town
Record Town
Structure Town
Record Structure Town
Town Structure
in VB how would you take a user input and store it in a variable userInput
userInput = Console.Readline()
userInput = Console.ReadKey()
userInput = Console.Read()
userInput = Input
In VB how would you find the length of a string with the identifier myString
myString(length)
myString.Len
Length.myString
myString.Length
in VB how would you join together an integer with the identifier n and a string with the identifier myString
n + myString
n & myString
n AND myString
n.MyString
in VB how would you convert myString to lower case
Lower(myString)
myString.Lower()
myString.ToLower()
Convert.ToLower(myString)
What is not needed in a Function in VB
Function
End Function
Sub
Return
How many parameters are there
Function getMyResult(input, n, score)
1
2
3
4
What type of test data would test a value that should be allowed as an input into a program
Correct
Right
Valid
normal
What type of test data would test a value that should be rejected as an input into a program
Wrong
Erroneous
invalid
incorrect
What type of test data would the edges of valid data
Edge
Boundary
Extreme
outside
Which type of error would stop the program from running?
syntax error
logic error
If a < 1 AND a > 10 Then
this code is not correct, what type of error is it
Syntax error
Logic error
Which error is harder to find
Syntax error
Logic error
A function must ...
contain parameters
return a value
declare its own variables
have an output
A subroutine that does not have to return a value is ....
a procedure
a function
In VB a procedure is written as ...
procedure myProcedure()
subroutine myProcedure()
sub myProcedure()
function myProcedure()
What is Visual Basic .NET?
A programming language used to create Windows desktop applications.
A database management system.
A web development framework.
A game development engine.
Which tool is used to create a new Visual Basic .NET project?
Visual Studio IDE
SQL Server Management Studio
Adobe Photoshop
Eclipse IDE
What is a variable in Visual Basic .NET?
A named storage location in memory that can hold a value.
A keyword used to define a new class.
A method used to control program flow.
A data structure used to store multiple values of the same type.
How can you change the width of a form in Visual Basic .NET?
Use the BackColor property of the form.
Use the ForeColor property of the form.
Use the Width property of the form.
Use the Height property of the form.
How can you change the font of a label in Visual Basic .NET?
Use the Font property of the label.
Use the ForeColor property of the label.
Use the Width property of the label.
Use the Height property of the label.
How can you change the fore-color of a label in Visual Basic .NET?
Use the Font property of the label.
Use the ForeColor property of the label.
Use the Width property of the label.
Use the Height property of the label.
How can you change the text property of a textbox in Visual Basic .NET?
Use the Text property of the textbox.
Use the Font property of the textbox.
Use the ForeColor property of the textbox.
Use the BackColor property of the textbox.
How can you display a message to the user in Visual Basic .NET?
Use the MessageBox.Show method.
Use the Console.WriteLine method.
Use the Debug.WriteLine method.
Use the WriteLine method of a file.
What is the purpose of string concatenation in Visual Basic .NET?
To combine two or more strings into a single string.
To separate a string into multiple substrings.
To remove whitespace from the beginning and end of a string.
To change the case of all characters in a string.
How do you declare a variable in Visual Basic .NET?
Using the var keyword.
Using the dim keyword.
Using the int keyword.
Using the string keyword.
A (a) the set of codes in your application that handles communication between an end user interface and a database.
C# is , except
Microsoft C# tool to build web application
Dynamic Web Pages, usually connected to a Database.
·open source, cross-platform version of ASP. (Platform solution for developing options)
None of the above
ASP stands for?
active server platform
active service platforms
active server pages
active service page
(a) is a pre-built structure that provides a foundation for creating applications.
is a software environment or framework that provides tools, libraries, and resources for developing and running software applications.
(a)
True or False: Dynamic Web Pages, usually connected to a Internet.
True
False
is ASP.Net Core a Front End programming?
True
False
is ASP.Net Core a Back End Programming?
True
False
is ASP.Net Core a Full Stack Programming?
True
False
handles page events and navigation between pages.
Model
View
Controller
manages the behavior of the Data.
Model
View
Controller
manage the display of the data
Model
View
Controller
(a) is language neutral that supports more than 20 languages
.NET is very similar to JAVA
True
False
Who developed ASP.Net Core?
(a)
What is ASP.NET Core?
A server-side web application framework
A client-side JavaScript framework
A database management system
A front-end design tool
Which of the following is a feature of ASP.NET Core?
Cross-platform support
Single language support
Front-end rendering only
Not open-source
What is the use of middleware in ASP.NET Core?
To manage client-side requests
To handle database queries
To define how HTTP requests are handled
To create API endpoints
Which programming languages can be used with ASP.NET Core?
Java and PHP
C# and F#
Python and Ruby
Swift and Kotlin
What does the Razor View Engine do in ASP.NET Core?
Manages server-side databases
Renders JavaScript components
Parses Razor markup and produces HTML responses
Compiles C# code into machine code
What is the purpose of the `Startup.cs` file in an ASP.NET Core project?
To configure how the application starts
To store user credentials
To define routing for the application
To run database migrations
What does the term "cross-platform" mean in the context of ASP.NET Core?
It can only run on Windows
It can run on multiple operating systems
It can only run on Linux
It can run without a server
What is Entity Framework Core in ASP.NET Core?
A UI framework
A front-end framework
An ORM (Object-Relational Mapper)
A CSS framework
What does MVC stand for in ASP.NET Core MVC?
Main View Controller
Model View Controller
Managed View Code
Modular Visual Control
What type of applications can be built using ASP.NET Core?
Web APIs
Web Apps
Real-time apps
All of the above
What is the purpose of the `wwwroot` folder in an ASP.NET Core project?
To store server-side code
To store static files like CSS, JavaScript, and images
To store configuration files
To store database files
What does the `.csproj` file manage in an ASP.NET Core ?
The project's folder structure
Project dependencies and configuration settings
Database connection strings
Client-side libraries
What is a controller's role in an MVC-based ASP.NET Core application?
To handle HTTP requests and return responses
To manage static files
To define the database schema
To write client-side JavaScript
How can you specify routes in an ASP.NET Core application using attribute routing?
By modifying the `wwwroot` folder
By adding attributes like `[Route]` to the controller methods
By configuring `launchSettings.json`
By modifying the `csproj` file
What file extension is used for Razor views in ASP.NET Core?
.html
.razor
.cshtml
.xml
Which of the following is the entry point of an ASP.NET Core application?
HomeController.cs
Program.cs
appsettings.json
wwwroot folder
What is the default action method in a controller?
Start()
Load()
Index()
Init()
From which version were .NET and .NET Core merged into a single platform?
.NET 4.0
.NET 5.0
.NET 6.0
.NET 7.0
What is the main disadvantage of .NET compared to .NET Core ?
.NET Framework is limited to running only on Windows
.NET Framework has better performance than .NET Core
.NET Framework supports cross-platform development
.NET Framework is lightweight and optimized for cloud environments
What is one key advantage of ASP.NET Core compared to other popular web frameworks like Django, Flask, or Ruby on Rails?
ASP.NET Core provides better cross-platform support than other web frameworks
ASP.NET Core offers built-in dependency injection and a highly modular architecture
ASP.NET Core lacks community support compared to other web frameworks.
ASP.NET Core is slower in performance compared to Django and Ruby on Rails.
