Assuming int is of 4bytes, what is the size of int arr[15];?
Answer: D
Since there are 15 int elements and each int is of 4bytes, we get 15*4 = 60bytes.
Enter details here
A program P reads in 500 integers in the range [0..100] exepresenting the scores of 500 students. It then prints the frequency of each score above 50. What would be the best way for P to store the frequencies?
Answer: A
No answer description available for this question.
Enter details here
What is meaning of the following statement ?
int *ptr[20]
Answer: C
No answer description available for this question.
Enter details here
If n has the value 3, then the statement
a [++n] = n++ ;
Answer: D
No answer description available for this question.
Enter details here
Comment on the below statements with respect to A and B
int *a1[8];
int *(a2[8]);
A. Array of pointers
B. Pointer to an array
Answer: C
No answer description available for this question.
Enter details here
The parameter passing mechanism for an array is
Answer: B
The parameter passing mechanism for an array is call by reference.This technique uses in/out-mode semantics. Changes made to formal parameter do get transmitted back to the caller through parameter passing. Any changes to the formal parameter are reflected in the actual parameter in the calling environment as formal parameter receives a reference (or pointer) to the actual data.
Enter details here
What will be the output of the program if the array begins at address 65486?
#include
int main()
{
int arr[] = {12, 14, 15, 23, 45};
printf("%u, %u\n", arr, &arr);
return 0;
}
Answer: B
No answer description available for this question.
Enter details here
Consider the array definition
int num [10] = {3, 3, 3};
Pick the Correct answers
Answer: A
No answer description available for this question.
Enter details here
What will be the output of the program ?
#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: C
No answer description available for this question.
Enter details here
Choose the correct statements
Answer: D
No answer description available for this question.
Enter details here