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

1 Answer

Answer :

D) 2

Related questions

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

Last Answer : C) initial

Description : The correct way to round off a floating number x to an integer value is (A) y = (int)(x+0.5) (B) y = int(x+0.5) (C) y = (int)x+0.5 (D) y = (int)((int)x+0.5)

Last Answer : (A) y = (int)(x+0.5)

Description : A computer program selects an integer in the set {k : 1 ≤ k ≤ 10,00,000} at random and prints out the result. This process is repeated 1 million times. What is the probability that the value k = 1 appears in the printout atleast once ? (A) 0.5 (B) 0.704 (C) 0.632121 (D) 0.68

Last Answer : (C) 0.632121

Description : NULL is (A) the same as 0 for integer (B) the same as blank for character (C) the same as 0 for integer and blank for character (D) not a value

Last Answer : (D) not a value

Description : In a relational database model, NULL values can be used for all but which one of the following? (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL. (B) To ... D) To fill a column in a tuple when that column does not really exist for that particular tuple.

Last Answer : (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL.

Description : Suppose the function y and a fuzzy integer number around -4 for x are given as y=(x-3)2+2 Around -4={(2,0.3), (3,0.6), (4,1), (5,0.6), (6,0.3)} respectively. Then f(Around - 4) is given by: (A) {(2,0.6), (3,0.3), ... 6), (3,1), (6,0.6), (11,0.3)} (D) {(2,0.6), (3,0.3), (6,0.6), (11,0.3)}

Last Answer : (C) {(2,0.6), (3,1), (6,0.6), (11,0.3)}

Description : A three dimensional array in C' is declared as int A[x][y][z]. Here, the address of an item at the location A[p][q][r] can be computed as follows (where w is the word length of an integer): (A) &A[0][0][0]+w(y*z*q+z*p+r) (B) &A ... *q+r) (C) &A[0][0][0]+w(x*y*p+z*q+r) (D) &A[0][0][0]+w(x*y*q+z*p+r)

Last Answer : Answer: B

Description : Consider the following database table : Create table test( one integer, two integer, primary key(one), unique(two), check(one≥1 and ≤10), check(two≥1 and ≤5) ); How many data records/tuples atmost can this table contain ?  (A) 5 (B) 10 (C) 15 (D) 50

Last Answer : (A) 5 

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

Description : Why do you write ‘Integer.parseInt(br.readLine())’?

Last Answer : A: The inputs in a java program comes in the form of String objects which are read using the br.readLine() function. Now if we want the input in integer form, we have to convert it into integer using the parseInt() function of the Integer wrapper class.

Description : Which of the following control expressions are valid for an if statement? A) An integer expression B) A Boolean expression C) Either A or B D) Neither A nor B

Last Answer : B) A Boolean expression

Description : Which of the following control expressions are valid for an if statement? A) An integer expression B) A Boolean expression C) Either A or B D) Neither A nor B

Last Answer : B) A Boolean expression

Description : A method name myMethod( ) that needs two integer arguments is declared as A) public void myMethod( ); B) public void myMethod(int a, int b); C) public void myMethod(int a, b); D) public int myMethod(a, b);

Last Answer : B) public void myMethod(int a, int

Description : Which of the following control expressions are valid for an if statement? A) an integer expression B) a Boolean expression C) either A or B D) Neither A nor B

Last Answer : B) a Boolean expression

Description : If an integer occupies 4 bytes and a character occupies 1 byte of memory, each element of the following structure would occupy how many bytes ? struct name { int age; char name[30]; }; A) 30 B) 32 C) 34 D) 36

Last Answer : C) 34

Description : An integer constant in C must have A) At least one digit B) At least one decimal point C) A comma along with digits D) Digits separated by commas

Last Answer : A) At least one digit

Description : What is the data type of (1)? a) Tuple b) Integer c) List d) Both tuple and integer

Last Answer : b) Integer

Description : Bresenham line drawing algorithm is attractive because it uses (A) Real arithmetic only (B) Integer arithmetic only (C) Floating point arithmetic (D) Real and integer arithmetic

Last Answer : (B) Integer arithmetic only

Description : If there are n integers to sort, each integer has d digits and each digit is in the set {1,2, ..., k}, radix sort can sort the numbers in: (A) O(d n k) (B) O(d nk) (C) O((d+n)k) (D) O(d(n+k))

Last Answer : (D) O(d(n+k))

Description : What is the value returned by the function f given below when n = 100 ? int f(int n)  { if (n==0) then return n;  else return n + f(n-2);  } (A) 2550 (B) 2556 (C) 5220 (D) 5520

Last Answer : (A) 2550

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 : 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 : 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 : Consider the following three SQL queries (Assume the data in the people table) : (a) Select Name from people where Age>21; (b) Select Name from people where Height>180; (c) Select Name from people where (Age>21) or (Height ... number of rows returned by the SQL query (c) ? (A) 3 (B) 7 (C) 10 (D) 21

Last Answer : (C) 10

Description : Methods can be overloaded with a difference only in the type of the return value .. A) Not supported B) False C) True D) None of the above

Last Answer : B) False

Description : State True or False. i) While overloading operators new operator can be overloaded. ii) The binary operator such as +, -, * and must explicitly return a value. A) True, True B) True, False C) False, True D) False, False

Last Answer : C) False, True

Description : State True or False i) A destructor never takes any argument nor does it return any value. ii) It releases memory space for future use. A) True, True B) True, False C) False, True D) False, False

Last Answer : A) True, True

Description : In C++, the keyword void was used ……….. A) To specify the return type of function when it is not returning any value. B) To indicate an empty argument list to a function. C) To declare the generic pointers. D) All of the above.

Last Answer : D) All of the above.

Description : What is an integer variable ?

Last Answer : A variable whose value is an integer is called an integer variable or integer variable.

Description : Which is not the main feature of DEC Alpha: a. 64 Bit RISC processor b. Designed to replace 32 VAX(CISC) c. Seven stage split integer/floating point pipeline d. Variable Instruction length

Last Answer : d. Variable Instruction length

Description : If Ram knows that y is an integer greater than 2 and less than 7 and Hari knows that y is an integer greater than 5 and less than 10, then they may correctly conclude that (A) y can be exactly ... two values (C) y may be any of three values (D) there is no value of y satisfying these conditions

Last Answer : (A) y can be exactly determined

Description : If A and B are two fuzzy sets with membership functions μA(x) = {0.6, 0.5, 0.1, 0.7, 0.8} μB(x) = {0.9, 0.2, 0.6, 0.8, 0.5} Then the value of μ(A∪B)’(x) will be (A) {0.9, 0.5, 0.6, 0.8, 0.8} (B) {0.6, 0.2, 0.1, 0.7, 0.5} (C) {0.1, 0.5, 0.4, 0.2, 0.2} (D) {0.1, 0.5, 0.4, 0.2, 0.3}

Last Answer : (C) {0.1, 0.5, 0.4, 0.2, 0.2}

Description : If A and B are two fuzzy sets with membership functions µA(X) = {0.2, 0.5, 0.6, 0.1, 0.9} µB(X) = {0.1, 0.5, 0.2, 0.7, 0.8} Then the value of µA∩B will be (A) {0.2, 0.5, 0.6, 0.7, 0.9} (B) {0.2, 0.5, 0.2, 0.1, 0.8} (C) {0.1, 0.5, 0.6, 0.1, 0.8} (D) {0.1, 0.5, 0.2, 0.1, 0.8}

Last Answer : (D) {0.1, 0.5, 0.2, 0.1, 0.8}

Description : Given that x=7.5, j=-1.0, n=1.0, m=2.0 the value of --x+j == x>n>=m is: (A) 0 (B) 1 (C) 2 (D) 3

Last Answer : (A) 0 

Description : Compute the value of adding the following two fuzzy integers: A = {(0.3,1), (0.6,2), (1,3), (0.7,4), (0.2,5)} B = {(0.5,11), (1,12), (0.5,13)} Where fuzzy addition is defined as μA+B(z) = maxx+y=z (min(μA(x), μB( ... ,18)} (D) {(0.3,12), (0.5,13), (0.6,14), (1,15), (0.7,16), (0.5,17), (0.2,18)}

Last Answer : (D) {(0.3,12), (0.5,13), (0.6,14), (1,15), (0.7,16), (0.5,17), (0.2,18)} 

Description : In the stock-price beta estimation for the Coca-Cola Company, the dependent variable is the: A. return on Coca-Cola. B. price of Coca-Cola stock. C. return on the S&P 500. D. value of the S&P 500 Index.

Last Answer : A. return on Coca-Cola.

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 : What is a variable?

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

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 : 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 : In C a variable cannot contain A) Blank Spaces B) Decimal Point C) Hyphen

Last Answer : A) Blank Spaces

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