What is the size of *p in this code?int **p;16 bytes8 bytes4 bytes32 bytes
Question
What is the size of *p in this code?int **p;16 bytes8 bytes4 bytes32 bytes
Solution
The size of *p in the code int **p; depends on the system architecture. If it's a 32-bit system, the size will be 4 bytes. If it's a 64-bit system, the size will be 8 bytes. This is because *p is a pointer, and the size of a pointer varies based on the system architecture.
Similar Questions
What is the size of *p in this code on a 64-bit machine?int **p;
What is the size of a pointer to an int (on a 64-bit architecture)8 bytes2 bytes4 bytes1 byteI don't know
Mark statements as T/F.True False int *p, i;char *cp, c;p = &i;cp = (char *)p;cp[2] = 'x';The last line of the above code modifies the variable i int *p; double *dp;sizeof(p) is 4 bytes while sizeof(dp) is 8 bytes. int *p;p[1] means *(p + 1) int *p; double *dp;p = p + 1 advances p by sizeof(int) bytes
How many bytes will this statement allocate on a 64-bit machine?malloc(sizeof(int) * 4)816432I don't know
What is the output of the following C code:#include <stdio.h>void fun(int **p);int main(){ int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 8, 7, 8, 9, 0}; int *ptr; ptr = &a[0][0]; fun(&ptr); return 0;}void fun(int **p){ printf("%d\n", **p);}1234
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.