A one dimensional array A has indices 1....75.Each element is a string and takes up three memory words. The array is stored starting at location 1120 decimal. The starting address of A[49] is
Answer: C
No answer description available for this question.
Enter details here
Predict the output of below code:
#include
int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j, m);
return 0;
}
Answer: B
No answer description available for this question.
Enter details here
In which of the following cases, linked list implementation of sparse matrices consumes the same memory space as the conventional way of storing the entire array?
Answer: C
Conventional way needs storage of m x n
In the case of linked list implementation of sparse matrices, storage needed will be(the number of non-zero entries).
Only in case(c), both the methods need the same storage of 30.
Enter details here
A pointer to a block of memory is effectively same as an array
Answer: A
No answer description available for this question.
Enter details here
Which of the following statements are correct about an array?
1. The array int num[26]; can store 26 elements.
2. The expression num[1] designates the very first element in the array.
3. It is necessary to initialize the array at the time of declaration.
4. The declaration num[SIZE] is allowed if SIZE is a macro.
Answer: B
No answer description available for this question.
Enter details here
What are the disadvantages of arrays?
Answer: B
Arrays are of fixed size. If we insert elements less than the allocated size, unoccupied positions can’t be used again. Wastage will occur in memory.
Enter details here
Size of the array need not be specified, when
Answer: A
No answer description available for this question.
Enter details here
Which of the following function is more appropriate for reading in a multi-word string?
Answer: C
The C library function gets() reads a line from stdin and stores it into the string pointed to by str.
Enter details here
If storage class is missing in the array definition, by default it will be taken to be
Answer: D
No answer description available for this question.
Enter details here
Consider the following type definition.
typedef char x[10];
x myArray[5];
What will sizeof(myArray) be ? (Assume one character occupies 1 byte)
Answer: C
No answer description available for this question.
Enter details here