What is the memory allocated by the following definition ?
int (*x)[10];

Answers were Sorted based on User's Feedback



What is the memory allocated by the following definition ? int (*x)[10]; ..

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

What is the memory allocated by the following definition ? int (*x)[10]; ..

Answer / subbu

no memory is allocated at the time of pointer declaration

Is This Answer Correct ?    9 Yes 6 No

What is the memory allocated by the following definition ? int (*x)[10]; ..

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 the memory allocated by the following definition ? int (*x)[10]; ..

Answer / chris_sreekanth

20 bytes

Is This Answer Correct ?    13 Yes 16 No

Post New Answer

More C Interview Questions

why we are using semicolon at the end of printh statment

2 Answers   HCL,


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

0 Answers  


Why Modern OS are interrupt driven?Give an example

3 Answers  


Why is c still so popular?

0 Answers  


int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[]

6 Answers   Hughes,






Is c language still used?

0 Answers  


What are the advantages and disadvantages of pointers?

0 Answers  


What is pointer & why it is used?

0 Answers  


What is the output of the following program main();{printf ("chennai""superkings"}; a. Chennai b. superkings c. error d. Chennai superkings

6 Answers  


What is the correct declaration of main?

0 Answers  


Give me basis knowledge of c , c++...

5 Answers  


How can I find out how much memory is available?

1 Answers   Persistent,


Categories