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 |
What is structure packing in c?
How can I avoid the abort, retry, fail messages?
Is this program statement valid? INT = 10.50;
what is difference between procedural language and functional language ?
What will be your course of action for a push operation?
code for concatination of 2 strings with out using library functions?
how to determine the complexity of an algorithm as log(n)
write the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.
what is the little endian and big endian?
What does == mean in texting?
Where can I get an ansi-compatible lint?
why 'c' is called middle level language.