Question
#define DIM( array, type) sizeof(array)/sizeof(type)
main(){
int arr[10];
printf(“The dimension of the array is %d”, DIM(arr, int));
}

Answers

Answer:
10
Explanation:
The size of integer array of 10 elements is 10 * sizeof(int). The macro expands to sizeof(arr)/sizeof(int) => 10 * sizeof(int) / sizeof(int) => 10.   Your Comment






Search
Can you Answer!!
  • Q Who compiled the pure book of Siks, ‘Adigranth’?
  • Q What is meant by impedance diagram.?
  • Q What is the difference between overlay graph and correlate graph?
  • Q What is the difference in using request.getrequestdispatcher() and context.getrequestdispatcher()?
  • Q Which is accurate in terms of how you should use your cell phone in public?
  • Q How can upload multiple pictures?
  • Q What is dermis
  • Q A code like this is given. a. for(i=0;i0;i--) Assuming no code optimization and assume that the microprocessor has flags etc. which one is correct.
  • Q Who is the author of “The Guest”?
  • Q What are federated tables?
  • Q World Bank