GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP
Go To First  |  Previous Question  |  Next Question 
 ASP  |  Question 23 of 146    Print  
What are LOCAL and GLOBAL variables?
Local variables lifetime ends when the Procedure ends. Global variables lifetime begins at the start of the
script and ends at the end of the script and it can be used by any procedure within the script. Declaring a
variable by using the keyword PRIVATE makes the variable global within the script, but if declared using PUBLIC, then all scripts can refer the variable.



  
Total Answers and Comments: 2 Last Update: June 07, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 26, 2006 03:06:19   #1  
MANISHA PATHAK Member Since: October 2006   Contribution: 14    

RE: What are LOCAL and GLOBAL variables?

Local variables are the variables which are declared within the scope of a method.Local variables are not accesses outside the scope of a method.

Global variables are the which are declared outside the method definition.Global variables are accesible anywhere.


 
Is this answer useful? Yes | No
June 07, 2007 06:09:58   #2  
lalita.p        

RE: What are LOCAL and GLOBAL variables?
Local Variable: The scope of the local variable is for the procedure in which they are declare. Which are called procedural level variable. Which are local to the procedure. The variables which are declare outside the procedure in option explicit whose scope is local to the form in which they are declare.

Global variables are the variables whose scope is throughout the applicaiton. Usually used in module are class.

 
Is this answer useful? Yes | No

 Related Questions

<% Set Application("Thing") = Server.CreateObject("THINGDOER.thingy") %> The above code appears in the global.asa file. What would it accomplish?
A. It would create a "Thing" object and place it in Contents Collection of the Application object. B. It would create a "Thing" object and place it in StaticObjects Collection of the 

A. Setting the [component name].scope property. B. Using the Server.CreateObject method. C. Placing it in the Session or Application OnStart event handler. D. Instantiating the component in the global.asa 
Latest Answer : Its Option E. tag ...

A. Client actions cannot change Application variables. B. The change is not visible to any client until the application is stopped and started. C. The change is only visible to future requests made by 
Latest Answer :  Answer : E ...

A. Relational data via Jet. B. Local or SQL data via Jet. C. Relational data via ODBC. D. Non-relational data via DSN-less ODBC. E. All types of data via OLE DB.  
Latest Answer : E is the right answer. i.e. All types of data using OLEDB ...

Local variables lifetime ends when the Procedure ends. Global variables lifetime begins at the start of the script and ends at the end of the script and it can be used by any procedure within the script. 
Latest Answer : Local Variable: The scope of the local variable is for the procedure in which they are declare. Which are called procedural level variable. Which are local to the procedure. The variables which are declare outside the procedure in option explicit whose ...

• Lock – prevents clients from modifying the variables stored in the Application object. • Unlock – removes the lock from variables stored in the Application object.  
Latest Answer : contents.removecontents.removealllockunlock ...

• Contents collection – contains all the variables established for a session without using the tag. • Static collection – contains all the objects created with the  
Latest Answer : There are two collections.  1. Contents - Contains all the items appended to the session through a script command.  2. StaticObjects - Contains all the objects appended to the session with the HTML tag ...

It provides extra information by which it makes the site easier to manage. It can include text files using the #include statement, retrieve the size and last modification date of a file, defines how variables 

A. This applies only to Visual Basic, not VBScript. B. All variables must be dimensioned before use. C. All variables are dimensioned at run-time. D. Forces all controls to have a SELECTED option. 
Latest Answer : Option Explicit is used to trap the undeclared variables or to define the variable before use. To avoid duplicate variable declaration. ...

A. Upon every request from an application by a client for an .asp document. B. Upon the first request from an application by a client for any file in the application. C. Upon the first request for an .asp 
Latest Answer : Answer should be E ...


 Sponsored Links

 
Related Articles

ODP.NET - Working with Bind Variables together with OracleParameter

ODP NET Working with Bind Variables together with OracleParameter With the help of OracleParameter you can include bind variables within any SQL statement These bind variables are nothing but run time query parameters The values in the SQL statement are bound at run time when we use bind variables m
 

Microsoft AJAX Library - Functions as Variables

Functions as Variables In JavaScript functions are first class objects This means that a function is regarded as a data type whose values can be saved in local variables passed as parameters and so on For example when defining a function you can assign it to a variable and then call the function thr
 

Swap two variables

How to swap two variables without using third variable? A variable is a named location in memory that is used to store data which can be modified in a program. Let us learn how to swap two variables without using third variable. This can be done in number of ways By using arithmetic operators
 

The Interview Snafu

How to turn someone else&rsquo;s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won&rsquo;t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

Increase your Job Outlook on Global Scale

Increase your Job Outlook on Global Scale The advent of both globalization and outsourcing are factors that are changing the world These elements have allowed the world to become much more interconnected and the differences between cultures which existed in the past have largely been reduced While m
 

JavaScript Variables

JavaScript Variables In this JavaScript tutorial you will learn about JavaScript variables rules for variable names in JavaScript declaration of variable in JavaScript variables usage JavaScript in external file how to place the JavaScript in external file and how to execute this JavaScript placed i
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape