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 |
What is a constant and types of constants in c?
what is a function method?give example?
What's the difference between DELETE TABLE and TRUNCATE TABLE commands?
Explain the difference between the local variable and global variable in c?
What are bitwise shift operators in c programming?
What are the functions to open and close file in c language?
what is the role you expect in software industry?
we compile c program in 32 processor and 64 bit processor .exe file is created in both the processors. if we want to run .exe file in 64 bit processor which is created in 32 bit processor. is that .exe file is run or not if it is not run why?
write a program for fibonaci series by using while loop in c?
5) Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.without using big int and exponential function
How can you dynamically allocate memory in C?
A B C D E F G F E D C B A A B C D E F F E D C B A A B C D E E D C B A A B C D D C B A A B C C B A A B B A A A