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

write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

0 Answers   HCL,


What is the difference between declaring a variable and defining a variable?

0 Answers  


write a programme that inputs a number by user and gives its multiplication table.

2 Answers  


What is the size of structure in c?

0 Answers  


code for replace tabs with equivalent number of blanks

0 Answers   Bosch,






What are the preprocessor categories?

0 Answers  


What are valid signatures for the Main function?

0 Answers  


Can the “if” function be used in comparing strings?

0 Answers  


What is pass by reference in functions?

0 Answers  


How do I declare a pointer to an array?

6 Answers   IBM,


what is the advantage of software development

1 Answers  


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

1 Answers  


Categories