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 function return array of N pointers to functions returning pointers to characters (C) an array of n pointers to function returning pointers to characters (D) an array of n pointers to function returning pointers to functions returning pointers to characters.

1 Answer

Answer :

Answer: A,B,C,D

Related questions

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 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 : 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 : If the queue is implemented with a linked list, keeping track of a front pointer and a rear pointer, which of these pointers will change during an insertion into a non-empty queue? (A) Neither of ... (B) Only front pointer changes (C) Only rear pointer changes (D) Both of the pointers changes

Last Answer : (C) Only rear pointer changes

Description : Consider an implementation of unsorted single linked list. Suppose it has its representation with a head and a tail pointer (i.e. pointers to the first and last nodes of the linked list). Given the ... the front node of the linked list. (D) Deletion of the last node of the linked list.

Last Answer : (D) Deletion of the last node of the linked list. 

Description : The number of strings of length 4 that are generated by the regular expression (0|∈) 1+2* (3|∈), where | is an alternation character, {+, *} are quantification characters, and ∈ is the null string, is: (A) 08 (B) 10 (C) 11 (D) 12

Last Answer : (D) 12

Description : The number of strings of length 4 that are generated by the regular expression (0+1 +|2+3 + )*, where | is an alternation character and {+, *} are quantification characters, is: (A) 08 (B) 09 (C) 10 (D) 12

Last Answer : (C) 10

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 : 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 : 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 : Before measuring an unknown resistance with an ohmmeter, you should _____________. A. adjust the meter's pointers to mid-scale B. change the meter's batteries C. center the meter's pointer at infinity D. short the test leads and calibrate the meter

Last Answer : Answer: D

Description : Write a program to compute the sum of all elements stored in an array using pointers.

Last Answer : #include #include void main() { int a[5],sum=0,i,*ptr; clrscr(); printf("\n Enter array elements:"); for(i=0;i

Description : Explain searching elements in array using pointers.

Last Answer : Consider an array of five elements as shown below: A[5]={ 10,20,30,40,50}; Search element(SE)=30 Pointer variable is declare as *ptr; Before starting search process ... If search element is not present in an array, then after comparing all elements stop the search process.

Description : The dereferencing operator ………….. is used to access a member when we use pointers to both the object and the member. A) ->* B) .* C) Any of the above D) None of the above

Last Answer : A) ->*

Description : In Unix operating system, special files are used to : (A) buffer data received in its input from where a process reads (B) provide a mechanism to map physical device to file names (C ... pointers associated with i-nodes (D) store information entered by a user application program or utility program

Last Answer : (B) provide a mechanism to map physical device to file names 

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 : What will be the output of the following segment of the program? main( ) { char *s = “hello world”; int i = 7; printf(“%, *s”, i, s); } (A) Syntax error (B) hello w (C) hello (D) o world

Last Answer : Answer: Marks given to all

Description : What is the output of the following program ? (Assume that the appropriate pre-processor directives are included and there is no syntax error) main() { char S[ ] = "ABCDEFGH"; printf ("%C",* (& ... Base address of S is 1000 */ } (A) ABCDEFGH1000 (B) CDEFGH1000 (C) DDEFGHH1000 (D) DEFGH1000

Last Answer : (D) DEFGH1000

Description : For like predicate which of the following is true. i) % matches zero of more characters. ii) _ matches exactly one character. A) i-only B) ii-only C) Both of them D) None of them

Last Answer : C) Both of them

Description : Assume that we need to download text documents at the rate of 100 pages per minute. A page is an average of 24 lines with 80 characters in each line and each character requires 8 bits. Then the required bit rate of the channel is ... ...... (A) 1.636 Kbps (B) 1.636 Mbps (C) 2.272 Mbps (D) 3.272 Kbps

Last Answer : Answer: Marks given to all

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 : getchar :: IO char in this given function what is indicated by IO char: a. when getchar is invoked it returns a character b. when getchar is executed it returns a character c. botha & b d. none of these

Last Answer : a. when getchar is invoked it returns a character

Description : If we define putchar function in putchar :. char -> IO () syntax than character input as an argument andreturns a. Useful value b. Get output c. Getno output d. None of these

Last Answer : c. Getno output

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 : 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 : If m and n are int type variables, what will be the result of the expression m% n when m=5 and n=2 ? A) 0 B) 1 C) 2 D) None of the above

Last Answer : B) 1

Description : Write a program to search a number from an array using pointer to array.

Last Answer : #include<iostream.h> #include<conio.h> void main() { int a[5],i,*a1,no,flag=1; clrscr(); a1=&a[0]; cout<<"\nEnter array elements :"<<endl; for(i=0;i<5 ... =0) { cout<<"\n\t Number is not present.... "; } getch(); }

Description : Write a program in C++ to search an element from an array using pointer.

Last Answer : #include<iostream.h> #include<conio.h> void main() { int a[10], n, i,*p, flag=0, x; clrscr(); cout<<"Enter no. of array elements \n"; cin>>n; cout<< ... } if(flag==0) cout<<x<<"is not found \n"; getch(); }

Description : The dereferencing operator ……… is used when the object itself is used width in the member pointer. A) ->* B) .* C) Any of the above D) None of the above

Last Answer : B) .*

Description : Match the following a) : : i) Pointer to member declarator b) : :* ii) Pointer to member operator c) ->* iii) Scope resolution operator A) a-ii, b-iii, c-i B) a-iii, b-i, c-ii C) a-i b-ii, c-iii D) a-iii, b-ii, c-i

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

Description : A pointer can hold A) Single address at a time B) Two addresses at a time C) Number of addresses at a time D) No address

Last Answer : A) Single address at a time

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 : In a queue, the initial values of front pointer f rare pointer r should be ….. and …….. respectively. A) 0 and 1 B) 0 and -1 C) -1 and 0 D) 1 and 0

Last Answer : B) 0 and -1

Description : The order of a leaf node in a B+ tree is the maximum number of children it can have. Suppose that block size is 1 kilobytes, the child pointer takes 7 bytes long and search field value takes 14 bytes long. The order of the leaf node is ............ (1) 16 (2) 63 (3) 64 (4) 65

Last Answer : Answer: All

Description : If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m, where n ≤ m, the expected number of collisions involving a particular key K is (A) less than 1 (B) less than lg n (C) greater than 1 (D) greater than lg n

Last Answer : (A) less than 1

Description : Let f(n) and g(n) be asymptotically non-negative functions. Which of the following is correct? (A) θ(f(n) * g(n)) = min(f(n), g(n)) (B) θ(f(n) * g(n)) = max(f(n), g(n)) (C) θ(f(n) + g(n)) = min(f(n), g(n)) (D) θ(f(n) + g(n)) = max(f(n), g(n))

Last Answer : (D) θ(f(n) + g(n)) = max(f(n), g(n))

Description : If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m, where n≤m, the expected number of collisions involving a particular key x is less than ................... (1) 1 (2) 1/n (3) 1/m (4) n/m

Last Answer : Answer: 1

Description : What is the drawback of an array?

Last Answer : A: Its size cannot be changed.

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 : 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 : 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]