Can U write a C-program to print the size of a data type
without using the sizeof() operator? Explain how it works
inside ?
Answer Posted / saikat
#include <stdio.h>
int main()
{
float a[2];
int size = (char*)&a[1] - (char*)&a[0];
printf("%d
",size);
return 0;
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How are pointers declared in c?
What does sizeof function do?
what is stack , heap ,code segment,and data segment
How can you check to see whether a symbol is defined?
Explain what are the advantages and disadvantages of a heap?
What functions are used in dynamic memory allocation in c?
Can we change the value of static variable in c?
Explain how can I convert a number to a string?
Why c is known as a mother language?
Who invented bcpl language?
Is malloc memset faster than calloc?
Why are algorithms important in c program?
Differentiate between static and dynamic modeling.
Define Array of pointers.
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?