On This Page

This set of Dot Net Architecture and Program Multiple Choice Questions & Answers (MCQs) focuses on Dot Net Architecture And Program Set 3

Q1 | The declaration statement for a class-level variable should be placed __________.
  • inside an event procedure
  • inside a general procedure
  • anywhere in the program region, except inside a procedure
  • above the statement public class frmname
Q2 | Variables declared inside a procedure are said to have ________________.
  • local scope
  • procedure-level scope
  • class-level scope
  • none of the above
Q3 | Suppose the variable myName is declared in a Dim statement in two different Sub procedures. Which statement is true?
  • the program will malfunction when it is executed.
  • when the value of myname is changed in one sub procedure, it will also be changed in the other sub procedure.
  • visual basic’s smart editor will alert you that this is an error before the program is executed.
  • the two variables will be local to their respective sub procedures.
Q4 | Which of the following statements is guaranteed to pass the variable numVar by value to the Sub procedure Tally?
  • tally(numvar)
  • tally(byval numvar)
  • tally((numvar))
  • tally(byval numvar as double)
Q5 | The ______________ of a Sub procedure are vehicles for passing numbers and strings to the Sub procedure.
  • call statements
  • arguments
  • parameters
  • variables declared inside
Q6 | Which of the following is NOT a reason for using procedures?
  • they break a complex problem down into smaller pieces.
  • they make a program run faster.
  • they can be reused easily.
  • they make it possible for a team of people to work together on a single program.
Q7 | Which one of the following is true about arguments and parameters?
  • arguments appear in call statements; parameters appear in sub statements.
  • parameters appear in call statements; arguments appear in sub statements.
  • they are synonymous terms.
  • they are completely unrelated in a program.
Q8 | Each individual variable in the list student(0), student(1), student(2) is known as a(n)
  • subscript
  • dimension
  • element
  • type
Q9 | The statement Const TAX_RATE As Doubleface=Calibri size=2> is not valid.
  • true
  • false
Q10 | Function names should be suggestive of the role performed. The names also must conform to the rules for naming variables.
  • true
  • false
Q11 | The input to a user-defined function can consist of one or more values.
  • true
  • false
Q12 | Both the input and output of a Function procedure can consist of several values.
  • true
  • false
Q13 | Suppose you want to write a procedure that takes three numbers, num1, num2, and num3; and returns their sum, product, and average. It is best to use a Function procedure for this task.
  • true
  • false
Q14 | Although a function can return a value, it cannot directly display information in a text box.
  • true
  • false
Q15 | Function procedures can invoke other Function procedures.
  • true
  • false
Q16 | A Function may return up to two values.
  • true
  • false
Q17 | The input to a user-defined function can consist of:
  • a single value
  • one or more values
  • no values
  • all of the above
Q18 | Variables appearing in the header of a Function procedure are called ____________.
  • values of the function
  • parameters
  • coordinates
  • arguments
Q19 | The arguments appearing in a Call statement must match the parameters in the appropriate Sub or Function header in all but one of the following ways. Which one?
  • number of arguments
  • names of arguments
  • data type of arguments
  • order of arguments
Q20 | A Do While loop checks the While condition before executing the statements in the loop.
  • true
  • false
Q21 | A Do?Loop Until block is always executed at least once
  • true
  • false
Q22 | A counter variable is normally incremented or decremented by 1.
  • true
  • false
Q23 | The value of the control variable should not be altered within the body of a For?Next loop.
  • true
  • false
Q24 | The body of a For…Next loop in Visual Basic will always be executed once no matter what the initial and terminating values are.
  • true
  • false
Q25 | The body of a For…Next loop in Visual Basic will always be executed once no matter what the initial and terminating values are. duplicate question?
  • true
  • false