FOR C PROGRAMMING LANGUAGE
Consider the following C programming language declaration. Find the values of the following. If undefined write undefined.
int A[2][3] = { {1, 2, 3}, {4, 5, 6} };
A[1][0]: [Value goes here]
*A[0]: [Value goes here]
*(*A + 1): [Value goes here]
**(A + 1): [Value goes here]
**(A + 2): [Value goes here]
The output for each call are as follows:
A[1][0]: [4]
*A[0]: [1]
*(*A + 1): [2]
**(A + 1): [4]
**(A + 2): [1]
The implemented code and corresponding output are as follows:
#include <stdio.h>
int main() {
int A[2][3]={{1,2,3},{4,5,6}};
printf("\n %d", A[1][0]);
printf("\n %d", *A[0]);
printf("\n %d", *(*A+1));
printf("\n %d", **(A+1));
printf("\n %d", **(A+2));
return 0;
}
Output:
Get Answers For Free
Most questions answered within 1 hours.