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 |
why we are using semicolon at the end of printh statment
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
Why Modern OS are interrupt driven?Give an example
Why is c still so popular?
int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[]
Is c language still used?
What are the advantages and disadvantages of pointers?
What is pointer & why it is used?
What is the output of the following program main();{printf ("chennai""superkings"}; a. Chennai b. superkings c. error d. Chennai superkings
What is the correct declaration of main?
Give me basis knowledge of c , c++...
How can I find out how much memory is available?