Declaration:a)Declaration is an act of defining a variable(s)b)A declaration states the type of a variable, along with its name. c)A variable can be declared only once. d)It is used by the compiler to help programmers avoid mistakes such as assigningstring values (i.e. name, address, etc.) to integer variables (i.e. age, number ofchildren, etc.). e)Before reading or assigning a variable, that variable must have been declared.Initialization:f)It's a special kind of assignment: the first. g)Before initialization objects have null value and primitive types have default valuessuch as 0 or false. h)Can be done in conjunction with declaration.Assignment:i)Throwing away the old value of a variable and replacing it with a new one.6-Explain the ways of assigning values to variables in VB.net. -Getting your data into a variable-Using the equals sign (=)-Make sure all variables are first declared before assignment7-State THREE (3)of the naming rules in vb.net.a)must start with a letter or underscoreb)cannot have spacesc)cannot use special characters8-Define the following: -(i)Scope of VariablesScope refers to the part of the program where a variable is visible and may be accessed by program code.(ii)Lifetime of VariablesLifetime of a variable is the period of time the variable exists. When a procedure terminates, all local variables will come to the end of its lifetime.The values of its local variables are not preserved and VB reclaims their memory. Next time the procedure is called, its local variables will be created afresh and reinitialized.
As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.
KiranTemple University Fox School of Business ‘17, Course Hero Intern
I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.
DanaUniversity of Pennsylvania ‘17, Course Hero Intern
The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.
JillTulane University ‘16, Course Hero Intern
Stuck? We have tutors online 24/7 who can help you get unstuck.
Ask Expert Tutors
You can ask
You can ask
You can ask
(will expire )