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

1 Answer

Answer :

A) Loop

Related questions

Description : 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.

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

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 : 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 : Some of the situations where inline expansion may not work are: A) For functions returning values, if a loop, a switch or goto exists. B) If functions contain static variables and they are re-cursive. C) For functions not returning values, if return statement exist. D) All of the above.

Last Answer : D) All of the above.

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 : 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 : 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 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 : 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 : 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 : 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 : In order to get maximum radiation to all surrounding points in the horizontal plane, the antenna used is a A. vertical loop B. vertical quarter-wavelength rod C. array which includes parasitic elements D. a horizontal Hertz dipole

Last Answer : B. vertical quarter-wavelength rod

Description : Consider the following database table having A, B, C and D as its four attributes and four possible candidate keys (I, II, III and IV) for this table: I: {B} II: {B, C} III: {A, D} IV: {C, D} If ... the database table? (A) I and III only (B) III and IV only (C) II only (D) I only

Last Answer : (C) II only

Description : Consider the following Entity-Relationship (E-R) diagram and three possible relationship sets (I, II and III) for this E-R diagram: If different symbols stand for different values (e.g., t1 is definitely not equal to t2 ... diagram ? (A) I only (B) I and II only (C) II only (D) I, II and III

Last Answer : (A) I only

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 : …………… is a condition in which there is a set of concurrent processes, only one of which is able to access a given resource or perform a given function at any time. A) Mutual Exclusion B) Busy Waiting C) Deadlock D) Starvation

Last Answer : A) Mutual Exclusion

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 : VGA stands for: a. Visual graph area b. Visual graphics array c. Visual graph accept d. All of these

Last Answer : b. Visual graphics array

Description : Accept data for five students and display it. Write a C++ program to displya sum of array elements of array size n. 

Last Answer : #include<iostream.h> #include<conio.h> void main() { int arr[20],i,n,sum=0; clrscr(); cout<<"\nEnter size of an array:"; cin>>n; cout<<"\nEnter ... ; } cout<<"\nSum of array elements is:"<<sum; getch(); }

Description : Write a C++ program to accept array of five elements, find and display smallest number from an array.

Last Answer : #include<iostream.h> #include<conio.h> void main() { int a[5],smallest,i; clrscr(); cout<<" Enter array elements:"; for(i=0;i<5;i++) cin>>a[i] ... } } cout<<endl<<"Smallest number="<<smallest; getch(); }

Description : By using ................... you can force immediate termination of a loop, by passing the conditional expression and any remaining code in the body of the loop. A) Break B) Continue C) Terminate D) Loop Close

Last Answer : A) Break

Description : break statement is used to i) get out of method ii) end aprogram iii) get out of a loop iv) get out of the system A) 1 & 2 B) 1,2 & 3 C) 1 & 3 D) 3

Last Answer : D) 3

Description : Loop unrolling is a code optimization technique: (A) that avoids tests at every iteration of the loop (B) that improves performance by decreasing the number of instructions in a basic block. ... loops with outer loops (D) that reorders operations to allow multiple computations to happen in parallel.

Last Answer : (A) that avoids tests at every iteration of the loop

Description : In .............., the bodies of the two loops are merged together to form a single loop provided that they do not make any references to each other. (A) Loop unrolling (B) Strength reduction (C) Loop concatenation (D) Loop jamming

Last Answer : (D) Loop jamming

Description : With respect to a loop in the transportation table, which one of the following is not correct? (1) Every loop has an odd no. of cells and at least 5. (2) Closed loops may or may not b square in ... starting cell, must be occupied cells. (4) Every loop has an even no. of cells and at least four.

Last Answer : Every loop has an odd no. of cells and at least 5.

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 : An Assertion is a predicate expressing a condition we wish database to always satisfy. The correct syntax for Assertion is : (A) CREATE ASSERTION ‘ASSERTION Name’ CHECK ‘Predicate’ (B) CREATE ASSERTION ‘ASSERTION NAME’ (C) CREATE ASSERTION, CHECK Predicate (D) SELECT ASSERTION

Last Answer : (A) CREATE ASSERTION ‘ASSERTION Name’ CHECK ‘Predicate’ 

Description : Computers that control processes accept data in a continuous a) data traffic pattern b) data highway c) infinite loop d) feedback loop e) None of these 44. What refers to a

Last Answer : c) infinite loop

Description : Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].

Last Answer : quicksort ((data + 222), 100)

Description : Write a numPy program to create a numPy array with all values as True printed 10 times. -Technology

Last Answer : This answer was deleted by our moderators...

Description : Python: how to convert a Numpy array of values True/False to 1/0 -Web-Development

Last Answer : answer:

Description : Write some code that declares an array on ints, assigns the values: 0,1,2,5,7,8,11 to that array and use a foreach to do something with those values.

Last Answer : int x = 0, y = 0; int[] arr = new int [] {0,1,2}; foreach (int i in arr) { if (i%2 == 0) x++; else y++; }

Description : Design a programme in C to read the n numbers of values in an array and display it in reverse order.

Last Answer : #include #include #define max 50 void main() { int a[max],i,n; clrscr(); printf("\n Enter number of elements:"); scanf("%d",&n); printf("\n Enter array element:"); for(i=0;i=0;i--) printf("\t%d",a[i]); getch(); }

Description : ..................... provides a larger sized of virtual memory but require virtual memory which provides multidimensional memory. A) Paging method B) Segmentation method C) Paging and segmentation method D) None of these

Last Answer : B) Segmentation method

Description : Which of the following special cases does not require reformulation of the problem in order to obtain a solution ? (A) Alternate optimality (B) Infeasibility (C) Unboundedness (D) All of the above

Last Answer : (A) Alternate optimality 

Description : Linking to another place in the same or another webpage require two A (Anchor) tags, the first with the ................. attribute and the second with the ................ attribute. (A) NAME & LINK (B) LINK & HREF (C) HREF & NAME (D) TARGET & VALUE

Last Answer : (C) HREF & NAME

Description : As compared to rental and leasing methods to acquire computer systems for a Management Information System (MIS), purchase method has following advantage : (A) It has high level of flexibility (B) It doesn’t require cash up-front (C) It is a business investment (D) Little risk of obsolescence

Last Answer : (C) It is a business investment

Description : Consider three CPU intensive processes P1, P2, P3 which require 20, 10 and 30 units of time, arrive at times 1, 3 and 7 respectively. Suppose operating system is implementing Shortest Remaining Time first (preemptive scheduling) ... end of Ready queue are not counted). (A) 3 (B) 2 (C) 4 (D) 5

Last Answer : (A) 3

Description : One of the disadvantages of user level threads compared to Kernel level threads is (1) If a user level thread of a process executes a system call, all threads in that process are ... privileges. (4) The library procedures invoked for thread management in user level threads are local procedures.

Last Answer : If a user level thread of a process executes a system call, all threads in that process are blocked.