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 |
Can we compile a program without main() function?
What is a volatile keyword in c?
How do you determine the length of a string value that was stored in a variable?
yogesh patil in dell
Explain c preprocessor?
What is a string?
What is default value of global variable in c?
What do you mean by dynamic memory allocation in c? What functions are used?
What is c language and why we use it?
what is an array
void main() { int x=25,y=32; clrscr(); x=x++ + y++; y=++x + ++y; printf("%d%d",x,y); }
Which type of language is c?