When an array is passed as a parameter to a function which of the following statements is correct? (A) The function can change values in the original array. (B) The function cannot change values in the original array. (C) Results in compilation error. (D) Results in runtime error.

1 Answer

Answer :

(A) The function can change values in the original array.

Related questions

Description : When an array is passed as parameter to a function, which of the following statements is correct ? (A) The function can change values in the original array. (B) In C, parameters are passed by value, ... . (D) Results in a run time error when the function tries to access the elements in the array.

Last Answer : (A) The function can change values in the original array.

Description : Which of the following cannot be passed to a function in C++? (1) Constant (2) Structure (3) Array (4) Header file

Last Answer : Answer: 4

Description : Which of the following differentiates between overloaded functions and overridden functions ? (A) Overloading is a dynamic or runtime binding and overridden is a static or compile time binding. ... function overloading, while redefining a function in a friend class is called function overriding.

Last Answer : (B) Overloading is a static or compile time binding and overriding is dynamic or runtime binding.

Description : To accept 100 different values into the array we require A) Loop B) If condition C) Function D) Structure

Last Answer : A) Loop

Description : What would happen if "String[]args" is not included as argument in the main method. A) No error B) Compilation error C) Program won't run D) Program exit

Last Answer : C) Program won't run

Description : Which of the following has compilation error in C ? (A) int n = 32; (B) char ch = 65; (C) float f= (float) 3.2; (D) none of the above

Last Answer : D

Description : Can you resize an array at runtime?

Last Answer : No

Description : The runtime for traversing all the nodes of a binary search tree with n nodes and printing them in an order is (A) O(lg n) (B) O(n lg n) (C) O(n) (D) O(n2 ) 

Last Answer : (C) O(n) 

Description : A software design pattern used to enhance the functionality of an object at runtime is: (1) Adapter (2) Decorator (3) Delegation (4) Proxy

Last Answer : Answer: 2

Description : How many values can be held by an array A(-1,m;1 ,m) ? (A) m (B) m2 (C) m(m+l) (D) m(m+2)

Last Answer : (D) m(m+2) Explanation: Total number of values =m(m+2). Because -1 to m, m+2 values and 1 to m, m values

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 one of the following is not a definition of error ? (A) It refers to the discrepancy between a computed, observed or measured value and the true, specified or theoretically correct value. (B) It ... to fail. (D) It refers to human action that results in software containing a defect or fault. 

Last Answer : The input, or clock pulse.

Description : What does runtime error bad argument #1 to pairs (table expected, got nil) mean?

Last Answer : answer:It means that the programmer of the game made a mistake while writing the code. At some point, there is a function called pairs being run, and it has an input that should be of the data type ... what to do with this input so its only option is to crash, which is what a runtime error is.

Description : What type of errors are not detected by assemblers: a. Syntax error b. Runtime error c. Logical error

Last Answer : c. Logical error

Description : Automatic initialization of object is carried out using a special member function called ………… A) Friend B) Casting C) Reference Parameter D) Constructor

Last Answer : D) Constructor

Description : What does the following expression means ? char *(*(* a[N]) ( )) ( ); (A) a pointer to a function returning array of n pointers to function returning character pointers. (B) a ... to characters (D) an array of n pointers to function returning pointers to functions returning pointers to characters.

Last Answer : Answer: A,B,C,D

Description : Which of the following statements is correct? (A) Every class containing abstract method must not be declared abstract. (B) Abstract class cannot be directly initiated with ‘new’ operator. (C) Abstract class cannot be initiated. (D) Abstract class contains definition of implementation.

Last Answer : Answer: B,C

Description : What will be the values of x, m and n after execution of the following statements? Int x, m, n; m=10; n=15; x= ++m + n++; A) x=25, m=10, n=15 B) x=27, m=10, n=15 C) x=26, m=11, n=16 D) x=27, m=11, n=16

Last Answer : C) x=26, m=11, n=16

Description : A constructor that accepts no parameters is called the ………………. A) Paramless constructor B) No parameter constructor C) Default constructor D) Argumentless constructor

Last Answer : C) Default constructor

Description : Which of the following is/are the fundamental semantic model(s) of parameter passing? (A) in mode (B) out mode (C) in-out mode (D) all of the above

Last Answer : (D) all of the above

Description : Which of the following condition is true for an object used as a function argument. i) A copy of the entire objects is passed to the function. ii) Only the address of the object is transferred to the function. A) Only i B) Only ii C) Both i and ii D) None of them

Last Answer : C) Both i and ii

Description : An artificial neurons receives n inputs x1, x2,...,xn with weights w1,w2,...,wn attached to the input links. The weighted sum ............... is computed to be passed on to a non-linear filter ϕ called activation function to release the output. (A) Σ wi (B) Σ xi (C) Σ wi + Σ xi (D) Σ wi . Σ xi

Last Answer : (D) Σ wi . Σ xi

Description : ……………. Allows definitions and query language statements to be entered; query results are formatted and displayed. A) Schema Processor B) Query Processor C) Terminal Interface D) None of the above

Last Answer : C) Terminal Interface

Description : Which one of the following is correct for overloaded functions in C++? (1) Compiler sets up a separate function for every definition of function. (2) Compiler does not set up a ... functions cannot handle different types of objects. (4) Overloaded functions cannot have same number of arguments.

Last Answer : Answer: 1

Description : What will happen if a predecessor description is generated that is satisfied by the initial state of the planning problem? a) Success b) Error c) Compilation d) Termination

Last Answer : d) Termination

Description : What is the drawback of an array?

Last Answer : A: Its size cannot be changed.

Description : Array is A) Primary data type B) Pointer data type C) Heterogeneous data type D) Homogenous data type

Last Answer : D) Homogenous data type

Description : Float a[15], what is the size of array? A) 17 B) 14 C) 15 D) 16

Last Answer : 16

Description : State True or False. i) Binary search is used for searching in a sorted array. ii) The time complexity of binary search is O(logn). A) True, False B) False, True C) False, False D) True, True

Last Answer : D) True, True

Description : If the given input array is sorted or nearly sorted, which of the following algorithm gives the best performance? a) Insertion sort b) Selection sort c) Quick sort d) Merge sort

Last Answer : a) Insertion sort

Description : What type of data is: a=[(1,1),(2,4),(3,9)]? a) Array of tuples b) List of tuples c) Tuples of lists d) Invalid type

Last Answer : b) List of tuples

Description : Equivalence partitioning is a .................. method that divides the input domain of a program into classes of data from which test cases can be derived. (A) White-box testing (B) Black-box testing (C) Orthogonal array testing (D) Stress testing

Last Answer : (B) Black-box testing

Description : What does the following declaration mean ? int (*ptr) [10]; (A) ptr is an array of pointers of 10 integers. (B) ptr is a pointer to an array of 10 integers. (C) ptr is an array of 10 integers. (D) none of the above.

Last Answer : (B) ptr is a pointer to an array of 10 integers.

Description : Consider an array A[20, 10], assume 4 words per memory cell and the base address of array A is 100. What is the address of A[11, 5] ? Assume row major storage. (A) 560 (B) 565 (C) 570 (D) 575

Last Answer : (A) 560

Description : The average case occurs in the Linear Search Algorithm when: (A) The item to be searched is in some where middle of the Array (B) The item to be searched is not in the array (C) The item to be searched is in the last of the array (D) The item to be searched is either in the last or not in the array

Last Answer : (A) The item to be searched is in some where middle of the Array

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 : Which one of the following array represents a binary max-heap? (A) [26, 13, 17, 14, 11, 9, 15] (B) [26, 15, 14, 17, 11, 9, 13] (C) [26, 15, 17, 14, 11, 9, 13] (D) [26, 15, 13, 14, 11, 9, 17]

Last Answer : (C) [26, 15, 17, 14, 11, 9, 13]

Description : Which of the following is true for computation time in insertion, deletion and finding maximum and minimum element in a sorted array? (1) Insertion-O(1), Deletion-O(1), Maximum-O(1), Minimum-O(1) (2) Insertion-O(1), ... (1), Minimum-O(1) (4) Insertion-O(n), Deletion-O(n), Maximum-O(n), Minimum-O(n)

Last Answer : Answer: 3

Description : A research paper (A) is a compilation of information on a topic.  (B) contains original research as deemed by the author. (C) contains peer-reviewed original research or evaluation of research conducted by others. (D) can be published in more than one journal.

Last Answer : (C) contains peer-reviewed original research or evaluation of research conducted by others.

Description : The number of function points of a proposed system is calculated as 500. Suppose that the system is planned to be developed in Java and the LOC/FP ratio of Java is 50. Estimate the effort (E) required to ... ) 25 person months (B) 75 person months (C) 62.5 person months (D) 72.5 person months

Last Answer : (C) 62.5 person months 

Description : Match the following mechanisms for interrupting the execution of a process and their uses. i) Interrupt a) Call to an operating system function ii) Trap b) Reaction to an asynchronous external event iii) Supervisor Call c) Handling of a error ... -a, iii-b C) i-b, ii-c, iii-a D) i-a, ii-c, iii-b

Last Answer : C) i-b, ii-c, iii-a

Description : Which of the following statements about a Money Bill is not correct? (1) A Money Bill can be tabled in either House of Parliament. (2) The Speaker of sLok Sabha is the final authority to decide ... within 14 days. (4) The President cannot return a Money Bill to the Lok Sabha for reconsideration.

Last Answer : (1) A Money Bill can be tabled in either House of Parliament Explanation : As per Article 110, a Money Bill can be introduced in Lok Sabha only. If any question arises whether a Bill is a Money Bill ... consult any one in coming to a decision or in giving his certificate that a Bill is a Money Bill.

Description : Which of the syntax is correct for insert statement? i) insert into values ii) insert into (column list) values A) i-only B) ii-only C) Both of them D) None of them

Last Answer : C) Both of them

Description : Which of the following statements is not true with respect to microwaves? (A) Electromagnetic waves with frequencies from 300 GHz to 400 THz. (B) Propagation is line-of-sight. (C) Very ... waves cannot penetrate walls. (D) Use of certain portions of the band requires permission from authorities.

Last Answer : (A) Electromagnetic waves with frequencies from 300 GHz to 400 THz.

Description : What can you say about the following statements? I. XML tags are case-insensitive. II. In JavaScript, identifier names are case-sensitive. III. Cascading Style Sheets (CSS) cannot be used with XML. IV. All well-formed ... IV are false. (3) only I and III are false. (4) only II and IV are false. 

Last Answer : Answer: Marks to all

Description : Which of the following statements is false? (A) Optimal binary search tree construction can be performed efficiently using dynamic programming. (B) Breadth-first search cannot be used to find connected components of a graph. (C) ... used to find the components of a graph. (1) A (2) B (3) C (4) D 

Last Answer : Answer: 2