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

What are pointers? What are different types of pointers?

0 Answers   Fidelity,


How are structure passing and returning implemented?

0 Answers  


WRITE A PROGRAM TO FIND A REVERSE OF TWO NO

7 Answers  


What is the difference between printf and scanf in c?

0 Answers  


What is the general form of #line preprocessor?

0 Answers  






void main() { for(; 0 ;) ... { printf("hello"); ... } getch(); }

1 Answers  


what is a static function

10 Answers   Satyam,


Is there any data type in c with variable size?

0 Answers  


write a progam to compare the string using switch case?

1 Answers  


What is meant by realloc()?

0 Answers  


Explain why C language is procedural?

0 Answers   GE,


which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

0 Answers  


Categories