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

How can I implement sets or arrays of bits?

0 Answers  


Can you pass an entire structure to functions?

0 Answers  


Is it possible to initialize a variable at the time it was declared?

0 Answers  


to find the closest pair

0 Answers   Infosys,


#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

0 Answers   Wilco,






How to set file pointer to beginning c?

0 Answers  


1. main() { printf("%d",printf("HelloSoft")); } Output?

3 Answers   HCL,


What is the explanation for prototype function in c?

0 Answers  


What should be keep precautions while using the recursion method?

1 Answers  


Why are algorithms important in c program?

0 Answers  


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

0 Answers  


Explain what is the use of a semicolon (;) at the end of every program statement?

0 Answers  


Categories