Q: Given an integer array arr[] ; the i th element can be accessed by writing
A.*(arr+i)
B.*(i + arr)
C.arr[i]
D.All of these
Correct Option: DExplanation: All of these
Q: If an array is declared as int arr[50] , how many elements can it hold?
A.49
B.50
C.51
D.0
Correct Option: BExplanation: 50
Q: The index of U in Oxford University Press is?
A.5
B.6
C.7
D.8
Correct Option: CExplanation: 7
Q: If an array is declared as arr[] = {1,3,5,7,9}; then what is the value of sizeof(arr[3]) ?
A.1
B.2
C.3
D.8
Correct Option: BExplanation: Answer: 2
<p> sizeof(arr[3]) --> this will find the size of the index 3 elements only </p>
Q: Faster access to non-local variables is achieved using an array of pointers to activation record called a
A.heap
B.activation tree
C.display
D.stack
Correct Option: CExplanation: Faster access to non-local variables is achieved using an array of pointer to activation records called a display
Q: Which function adds a string to the end of another string?
A.stradd()
B.strcat()
C. strtok()
D.strcpy()
Correct Option: BExplanation: strcat()
Q: Replace("XXXYYYZZZ", "XY", "AB") =
A.XXABYYZZZ
B.XABYYYZZZ
C.ABXXXYYYZZ
D.ABXXXYYYZZZ
Correct Option: AExplanation: XXABYYZZZ
Q: strcat() is defined in which header file?
A. ctype.h
B.stdio.h
C.string.h
D. math.h
Correct Option: CExplanation: string.h
Q: Suppose we want to arrange n numbers stored in an array such that all negative values occur such before all positive ones. Minimum number of exchange required in the worst case
A.n-1
B.n
C.n+1
D.none of the above
Correct Option: AExplanation: n-1
Q: Memory for a structure is allocated at the time of