What is a variable?

1 Answer

Answer :

A: A variable is a named memory location whose value can change.

Related questions

Description : What is a class variable?

Last Answer : A: Instance variables having the keyword ‘static’ before it is a class variable. For every object there is just one copy of the variable made.

Description : How do you make a variable into a constant?

Last Answer : A: By adding the keyword ‘final’ before a variable declarations. Example: final int a = 5;

Description : State true of false. i) Public can only be assigned to class ii) Protected protects a statement iii) Protected method is never accessible outside the package iv) Friendly variable may be accessible outside class A) i- ... -false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true

Last Answer : C) i-false, ii-true, iii-false, iv-false

Description : If a variable is declared final, it must include ...................... value. A) integer B) no C) initial D) float

Last Answer : C) initial

Description : In Java variables, if first increment of the variable takes place and then the assignment occurs. This operation is also called ............................. . A) pre increment B) post increment C) incrementation D) pre incrementation

Last Answer : A) pre increment

Description : Which of the following is not mandatory in variable declaration? A) a semicolon B) an identifier C) an assignment D) a data type

Last Answer : C) an assignment

Description : A variable is defined within a block in a body of a function. Which of the following are true? A) It is visible throughout the function. B) It is visible from the point of definition to the end ... visible from the point of definition to the end of the block. D) It is visible throughout the block.

Last Answer : D) It is visible throughout the block.

Description : Which of the following is true about the static member variable in C++. i) It is initialized to zero when the first object of its class is created. Other initialization is also permitted. ii) It is visible only within ... , ii-True B) ii-False, ii-True C) i-True, ii-False D) i-False, iii-False

Last Answer : B) ii-False, ii-True

Description : Which of the following cannot be passed to a function? A) Reference variable B) Arrays C) Class objects D) Header files

Last Answer : D) Header files

Description : Which of the following is FALSE in C? A) Keywords can be used as variable names B) Variable names can contain a digit C) Variable names do not contain a blank space D) Capital letters can be used in variables

Last Answer : A) Keywords can be used as variable names

Description : Assume that variable x resides at memory location 1234, y at 1111 and p at 2222. Int x=1, y=2, *p; p=&x; y=*p; What will be the value of y after execution of above code? A) 2 B) 1 C) 1234 D) 1111

Last Answer : C) 1234

Description : In C a variable cannot contain A) Blank Spaces B) Decimal Point C) Hyphen

Last Answer : A) Blank Spaces

Description : Pointer holds A) Value of variable B) Address of variable C) Value and address of variable D) Always null

Last Answer : B) Address of variable

Description : If a is an integer variable, a=7/3; will return a value A) 2.5 B) 3 C) 0 D) 2

Last Answer : D) 2

Description : ………………….. implies that all subnets obtained from the same subnet mask. A) Static subnetting B) Dynamic subnetting C) Variable length subnetting D) Both B and C

Last Answer : A) Static subnetting

Description : ........ implies that all subnets obtained from the same network use the subnet mask. A) Static subnetting B) Dynamic Subnetting C) Variable length subnetting D) Both B and C

Last Answer : A) Static subnetting

Description : At any iteration of simplex method, if Δj (Zj – Cj) corresponding to any nonbasic variable Xj is obtained as zero, the solution under the test is (A) Degenerate solution (B) Unbounded solution (C) Alternative solution (D) Optimal solution

Last Answer : (C) Alternative solution

Description : A data file of 1,00,000 characters contains only the characters g-l, with the frequencies as indicated in table:  using the variable-length code by Huffman codes, the file can be encoded with (A) 2,52,000 bits (B) 2,64,000 bits (C) 2,46,000 bits (D) 2,24,000 bits

Last Answer : (D) 2,24,000 bits 

Description : Find the false statement: (A) In Modern Cryptography, symmetric key algorithms use same key both for Encryption and Decryption. (B) The Symmetric cipher DES (Data Encryption Standard) was widely used ... and 124 bits. (D) Public key algorithms use two different keys for Encryption and Decryption.

Last Answer : (C) The AES (Advanced Encryption Standard) cryptosystem allows variable key lengths of size 56 bits and 124 bits.

Description : Which of the following is false for the programming language PROLOG? (A) A PROLOG variable can only be assigned to a value once (B) PROLOG is a Strongly Typed Language. (C) The scope of a variable in PROLOG is a single clause or rule. (D) the scope of a variable in PROLOG is a Single Query

Last Answer : (B) PROLOG is a Strongly Typed Language.

Description : A basic feasible solution of a linear programming problem is said to be ............... if at least one of the basic variable is zero. (A) degenerate (B) non-degenerate (C) infeasible (D) unbounded

Last Answer : (A) degenerate 

Description : When one object reference variable is assigned to another object reference variable then (A) a copy of the object is created. (B) a copy of the reference is created. (C) a copy of the ... not created. (D) it is illegal to assign one object reference variable to another object reference variable.

Last Answer : (B) a copy of the reference is created.

Description : There are three processes P1, P2 and P3 sharing a semaphore for synchronising a variable. Initial value of semaphore is one. Assume that negative value of semaphore tells us how many processes are waiting in queue. Processes access ... The final value of semaphore will be: (1) 0 (2) 1 (3) -1 (4) -2 

Last Answer : Answer: 1