What is the memory allocated by the following definition ?
int (*x)[10];
Answers were Sorted based on User's Feedback
Answer / niraj singh
It will occupy 2 bytes of memory(In 16-bit system).
Explanation: int (*x)[10] means pointer to an array of 10
integers , not an array of 10 nos. of integer pointers. So
any pointer can take two bytes of memory.
Is This Answer Correct ? | 32 Yes | 1 No |
Answer / subbu
no memory is allocated at the time of pointer declaration
Is This Answer Correct ? | 9 Yes | 6 No |
Answer / kracekumar
integer occupies 4 bytes in *nix os and 2 byte in DOS/Windows ,so the right answer is sizeof(int)*10.
Is This Answer Correct ? | 3 Yes | 1 No |
How can I implement sets or arrays of bits?
Can you pass an entire structure to functions?
Is it possible to initialize a variable at the time it was declared?
to find the closest pair
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
How to set file pointer to beginning c?
1. main() { printf("%d",printf("HelloSoft")); } Output?
What is the explanation for prototype function in c?
What should be keep precautions while using the recursion method?
Why are algorithms important in c program?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
Explain what is the use of a semicolon (;) at the end of every program statement?