What are the function variables? (OR)
What are the local and global variables?

1 Answer

Answer :

FUNCTION VARIABLES : They are two types of variables.
 1 : Local Variable.
 2 : Global Variable.
1 : Local Variable : The local variables are defined within the body of the function or block. These
variables can acess by that function only, other functions can not acess these variables.
Ex : fun1(int a,int b)
 {
 int c,d; // Here c and d are the Local variable
}
2 : Global Variable : Global variables are defined outside the main() function and multible functions can
use these variables.

 Ex : int m=5, n=10; //Global Variable
 main()
 {
 int a,b;
 }
Here the variables ‘m’ and ‘n’ are defined outside the main() function. Hence they are global variables.

Related questions

Description : what is function? Write types of function with example?

Last Answer : Function: Function means, a large program can be divided into a series of individual related programs called modules. These modules are called functions. A function is a program segment that carries out ... efficiency of program. 4 : Function sharing : A function can be shared by many programmers.

Description : What is the macro function?

Last Answer : Macro Substitution : They are two types of macro substitution. 1 : Macro substitution without arguments. 2 : Macro substitution with arguments. 1 : Macro substitution without arguments : It is a process to ... varn like the formal parameters in a function definition. Ex : #define PROD(x) (x*x)

Description : What is return statement in function?

Last Answer : Return Statement : The return statement may or may not send back any values to the calling function(main program). Syntax : return; // does not return any value or return(exp); // the ... function can return some values other than int type, then we must specify the data type to be return.

Description : What are the function parameters?

Last Answer : PARAMETERS : parameters provides the data communication between the calling function and called function. They are two types of parametes 1 : Actual parameters. 2 : Formal parameters. 1 : Actual Parameters : These ... . . } Where a, b are the Actual Parameters x, y are the Formal Parameters

Description : What is function definition? (OR) what is user defined function? (OR) Write syntax of user defined function?

Last Answer : Function Definition : The program module that is written to achieve a specific task is called function definition. Syntax : type function-name(parameter list) // function header. { declaration of variables; body of function; // ... and b ); scanf( %d%d ,&a,&b); c=a+b; printf( %d ,c); }

Description : What is calling function? (OR) what is function call?

Last Answer : Function Call : The function can be called by simply using the function name. Syntax : function-name(); function-name(parameters); return value = function-name(parameters); Ex : add(); // function ... ,b); // function with arguments. c=fun(a,b); // function with arguments and return values

Description : How to Decleration of function?

Last Answer : Function Declaration (Function Prototype) : Like variable, all functions in a C program must be declared, before they are invoked. The declaration of each function should end with semicolon. Ths is ... : Parameter list declares the variables that will receive the data sent by the calling program.

Description : What is a function? Write advantages of function?

Last Answer : Function: Function means, a large program can be divided into a series of individual related programs called modules. These modules are called functions. A function is a program segment that carries ... efficiency of program. 4 : Function sharing : A function can be shared by many programmers

Description : Write a C program addition of two matrices?

Last Answer : #include #include void main() { int a[25][25],b[25][25],c[25][25],i,j,m,n; clrscr(); printf("enter the rows and colums of two matrics:\n"); scanf("%d%d",&m,&n); printf("\nenter the elements of A matrics"); for(i=0;i

Description : Write a C program multiplication of two matrices?

Last Answer : // Write a C program Multiplication of Two Matrices. #include #include void main() { int a[25][25],b[25][25],c[25][25],i,j,m,n,k,r,s; clrscr(); printf("enter the rows and colums of A matrics:\n"); ... B matrics:\n"); scanf("%d%d",&r,&s); printf("\nenter the elements of A matrics"); for(i=0;i

Description : What is call by value and call by reference?

Last Answer : PASSING PARAMETERS TO FUNCTIONS : The called function receives the information from the calling function through the parameters. The variables used while invoking the calling function are called actual parameters and the variables used in the ... *b) { int temp; temp=*a; *a=*b; *b=temp; }

Description : Explain category of functions with examples?

Last Answer : CATEGORY OF FUNCTIONS : A function, depending on whether arguments are present or not and whether a value is returned or not. The following are the function prototypes. 1 : Functions with no Parameters and no Return Values. 2 : ... (); } int sum(int a,int b) { int c; c=a+b; return c; }

Description : How to initialization of array with example?

Last Answer : Initilization of Array : assigning the required information to a variable before processing is called initialization.we can initialize the individual elements of an array. Array elements can be initialized at the time of declaration. Syntax : ... M','P','U','T','E','R'}; char b[] = COMPUTER ;

Description : What is an Array? Write advantages of arrays?

Last Answer : An array is a collection of similar data items. All the data items of an array are stored in continuous memory locations in RAM. The elements of an array are of same data type and each item can be accessed using the same name.

Description : What is call by reference? (OR) what is pass by reference?

Last Answer : Pass by reference (OR) Call by Reference : In pass by reference, a function is called with addresses of actual parameters. In the function header, the formal parameters receive the addresses of actual parameters. Now the formal parameters do ... a,int *b) { int temp; temp=*a; *a=*b; *b=temp; }

Description : What is call by value? (OR) what is pass by value?

Last Answer : Pass by value (OR) Call by value : When a function is called with actual parameters, the values of actual parameters are copied into formal parameters. If the values of the formal parametes changes in the function, the values of ... void swap(int a,int b) { int temp; temp=a; a=b; b=temp; }

Description : Write categeory of functions ?

Last Answer : CATEGORY OF FUNCTIONS : A function, depending on whether arguments are present or not and whether a value is returned or not. The following are the function prototypes. 1 : Functions with no ... : Functions with Parameters and no Return Values. 4 : Functions with Parameters and Return Values.

Description : Write types of functions?

Last Answer : The functions can be classified into two categories. 1 : Built in Functions (OR) Library Functions 2 : User-defined Functions. 1 : Built-in Functions (OR) Library Functions : The standard C ... increase efficiency of program. 4 : Function sharing : A function can be shared by many programmers.

Description : Why are local variable names beginning with an underscore discouraged? a) they are used to indicate a private variables of a class b) they confuse the interpreter c) they are used to indicate global variables d) they slow down execution

Last Answer : Answer: a Explanation: As Python has no concept of private variables, leading underscores are used to indicate variables that must not be accessed from outside the class.

Description : Typically, in a global product structure: a) adaptation to local needs is high. b) marketing is the most important function. c) marketing is subservient to operations. d) operation is subservient to marketing

Last Answer : marketing is subservient to operations.

Description : When the form is running in DEBUG mode, If you want to examine the values of global variables and other form variables, What package procedure command you would use in your trigger text ?

Last Answer : Break. SYSTEM VARIABLES

Description : Global marketing involves developing marketing strategies as if the world is one market. Which one fo the following marketing mix variables is MOST difficult to standardise for global marketing ? 1. Brand name 2. Package 3. Media allocation 4. Labels 5. Product characteristics

Last Answer : Media allocation

Description : Define what are global variables and Define How do you declare them?

Last Answer : Global variables are variables that can be accessed and manipulated anywhere in the program. To make a variable global, place the variable declaration on the upper portion of the program, just after the preprocessor directives section.

Description : Define what are global variables?

Last Answer : Global Variables are those, which are required to be accessed by all the functions defined after their declaration. So, the variables declared before the main {) can be accessed by all the functions, which follow their declaration.

Description : Global marketing involves developing marketing strategies as if the world is one market. Which one of the following marketing mix variables is MOST difficult to standardise for global marketing? A)Brand name B)Package C)Media allocation D)Labels E)Product characteristics

Last Answer : C)Media allocation

Description : Match the following types of variables with the corresponding programming languages: (a) Static variables (i) Local variables in Pascal (b) Stack dynamic (ii) All variables in APL (c) Explicit heap dynamic (iii) Fortran 77 (d) Implicit ... (ii) (C) (iii) (i) (iv) (ii) (D) (ii) (i) (iii) (iv)

Last Answer : (C) (iii) (i) (iv) (ii) 

Description : English slang, Englishisms, phrases and idioms have been discussed here over and over since day one - nonetheless, come across any new (local, global) slang euphemism lately?

Last Answer : I’m so behind the times – I’ve just discovered ‘My bad’. Then I heard it on an old episode of Friends from about 10 years ago.

Description : The points in the entire structure are defined using the coordinates system is known as a.local coordinates system b.natural coordinates system c.global coordinate system d.none of the above

Last Answer : c.global coordinate system

Description : Why is a dense and efficient network of transport and communication a prerequisite for the development of local, national and global trade of today? -SST 10th

Last Answer : Dense and efficient network of transport and communication: (i) We use different material and services in our daily life. Some of these are available in our immediate surroundings while other ... with the rest of the world despite its vast size diversity, linguistic and socio-cultural plurality.

Description : In contemporary society global styles are given a unique local flavour. Explain the concept of cultural hybridisation with examples.

Last Answer : In contemporary society global styles are given a unique local flavour. Explain the concept of cultural hybridisation with examples.

Description : How are local energy systems in the desert related to global systems?

Last Answer : Feel Free to Answer

Description : How does global stratification impact local culture positively?

Last Answer : Need answer

Description : Uncertainty arises in the wumpus world because the agent’s sensors give only ___________ a) Full & Global information b) Partial & Global Information c) Partial & local Information d) Full & local information

Last Answer : c) Partial & local Information

Description : What are the main cons of hill-climbing search? a) Terminates at local optimum & Does not find optimum solution b) Terminates at global optimum & Does not find optimum solution c) Does not find optimum solution & Fail to find a solution

Last Answer : a) Terminates at local optimum & Does not find optimum solution

Description : A complete, local search algorithm always finds goal if one exists, an optimal algorithm always finds a global minimum/maximum. a) True b) False

Last Answer : a) True

Description : What are the main cons of hill-climbing search? A : Terminates at local optimum & Does not find optimum solution B : Terminates at global optimum & Does not find optimum solution C : Does not find optimum solution & Fail to find a solution D : Fail to find a solution

Last Answer : A : Terminates at local optimum & Does not find optimum solution

Description : Which localization does not requre any previous informatiom A : Absolute B : Local C : Global D : Passive

Last Answer : C : Global

Description : Which localization does not requre any previous informatiom A : Absolute B : Local C : Global D : Passive

Last Answer : C : Global

Description : What are the main cons of hill-climbing search? A : Terminates at local optimum & Does not find optimum solution B : Terminates at global optimum & Does not find optimum solution C : Does not find optimum solution & Fail to find a solution D : Fail to find a solution

Last Answer : A : Terminates at local optimum & Does not find optimum solution

Description : Which localization does not requre any previous informatiom A : Absolute B : Local C : Global D : Passive

Last Answer : C : Global

Description : What are the main cons of hill-climbing search? A : Terminates at local optimum & Does not find optimum solution B : Terminates at global optimum & Does not find optimum solution C : Does not find optimum solution & Fail to find a solution D : Fail to find a solution

Last Answer : A : Terminates at local optimum & Does not find optimum solution

Description : subroutine declaration come after procedure announcement: a. Global b. Local c. Botha &b d. None of these

Last Answer : a. Global

Description : If internal subroutine is called global data is used to pass values defining parameters between __ program and defined | a. Main and subroutine b. Local and subroutine c. Global and subroutine d. Global and main

Last Answer : a. Main and subroutine

Description : In a ________ network, twotypes of addressing are involved: global and local. A) virtual-circuit B) datagram C) circuit-switched D) none of the above

Last Answer : virtual-circuit

Description : These are the Four Stages of Globalization A. Domestic, International, Multinational, Global (Stateless) B. Local, State, Country, World C. Micro, Macro, Geo-political, Geo-social D. Exporting, Licensing, Franchising, Joint Venture

Last Answer : Domestic, International, Multinational, Global (Stateless)

Description : These are the Four Stages of Globalization A. Domestic, International, Multinational, Global (Stateless) B. Local, State, Country, World C. Micro, Macro, Geo-political, Geo-social D. Exporting, Licensing, Franchising, Joint Venture

Last Answer : Domestic, International, Multinational, Global (Stateless)

Description : What three broad factors determine global strategy of multinational firms? a) Local globalizing drivers, industry globalizing drivers, internal globalizing drivers b) Cultural globalizing ... orientation d) Macro globalizing drivers, industry globalizing drivers, internal globalizing drivers

Last Answer : Macro globalizing drivers, industry globalizing drivers, internal globalizing drivers

Description : When a firm seeks the benefits of global integration and local adaptation, it is best described as which type of strategy? a) Transnational b) Global c) Multi-national d) Global-local

Last Answer : Transnational

Description : Master Files contain data of: a) Permanent Nature b) Global Nature c) Temporary Nature d) Local Natur e) None of These

Last Answer : a) Permanent Nature

Description : In 90’s the global management perception was based on A. Standardization v/s adaptation B. Globalization v/s localization C. Global integration v/s Local Responsiveness D. Local responsiveness

Last Answer : Globalization v/s localization