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 main void in c?
What is the difference between null pointer and the void pointer?
What is 1f in c?
what is the meaning of 'c' language
write a function to find whether a string is palindrome or not and how many palindrome this string contain?
Explain the binary height balanced tree?
What the advantages of using Unions?
4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it. i have done maximum par but i m findind problem in the commented area. please help...
Write a c pgm for leap year
11 Answers College School Exams Tests, IBM, TCS,
Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation
What is dynamic dispatch in c++?