ASP Classic Study Test
Practice tests to further your career.
Intro
The following study test contains practice certification questions along with a study link for each question.
These questions were prepared by Mike Prestwood and are intended to stress an important aspect. All our practice questions are intended to prepare you
specifically to earn your Prestwood certification and generally for passing any certification test as well as prepare you for
professional work.
Features:
Each question has a popup [Review] link.
Hover over answers to reveal correct answer.
10 Questions
Mouse over answers to reveal correct answer.
Beginner
2 Beginner Level Questions
Question #1: True or False?
Given the following code, will True or False be written?
Dim a, b, c, d a = True b = True c = True d = False If Not (a And b) And (c Or d) Then Response.Write("True") Else Response.Write("False") End If
Answer:
Question #2: Multiple Choice
Which code snippet is syntactically correct?
Answer:
1. Dim MyName MyName = "Nathan" Response.Write "Hello " & MyName
2. Dim MyName myname = "Nathan" response.write "Hello " & myname
3. Dim MyName MYNAME = "Nathan" RESPONSE.WRITE "Hello " & MYNAME
Intermediate
5 Intermediate Level Questions
Question #3: True or False?
The default for parameters for subroutines and functions is by value.
Answer:
Question #4: Yes or No?
Given the following two functions:
Function This() This = False End Function Function That() That = True End Function
Will the That function in the following code execute?
If This And That Then Response.Write("<br>hello.") End If
Answer:
Question #5: Yes or No?
Given this code:
If IsCustomerCurrent and IsCustomerInUS Then Response.Write "Option 1" Else Response.Write "Option 2" End If Both functions IsCustomerCurrent and IsCustomerInUS return either true or false. If IsCustomerCurrent returns true, does the code in IsCustomerInUS still execute?
Answer:
Question #6: Multiple Choice
What is the difference between Response.Redirect and Server.Transfer ?
Answer:
1. Response.Redirect will create a new HTTP request as if the user typed the URL into their address bar.
Server.Transfer transfers the execution of the page without the user knowing there is more than one script being used. However, form post variables and the query string from the original page cannot be used.
2. Server.Transfer will create a new HTTP request as if the user typed the URL into their address bar.
Response.Redirect transfers the execution of the page without the user knowing there is more than one script being used. In addition, form post variables and the query string from the original page can be used.
3. Response.Redirect will create a new HTTP request as if the user typed the URL into their address bar.
Server.Transfer transfers the execution of the page without the user knowing there is more than one script being used. In addition, form post variables and the query string from the original page can be used.
4. None of the above, there is no real difference.
Question #7: Yes or No?
Are arrays in ASP Classic zero-based?
Answer:
Advanced
3 Advanced Level Questions
Question #8: Multiple Choice
Will the following code print "Hello, World!" or will it cause an error?
<%@LANGUAGE='VbScript'%> <%Option Explicit%> <html> <body> <%Dim s s = Null If Len(s) = 0 Then Response.Write("Hello, World!") End If %> </body> </html>
Answer:
2. It will print "Hello, World!".
Question #9: Multiple Choice
In ASP Classic object oriented programming, when an object instance is created from a class, ASP calls a special parameter-less sub named what?
Answer:
Question #10: Multiple Choice
In ASP Classic object oriented programming, when an object instance is destroyed, Access VBA calls a special parameter-less sub named what?
Answer: