how to find the size of the data type like int,float
without using the sizeof operator?
Answer Posted / vishnu948923
void main()
{
char *ptr1,*ptr2;
float fl;
ptr1 = &fl;
ptr2 = (&fl+1);
printf("%u",ptr2-ptr1);
}
| Is This Answer Correct ? | 29 Yes | 15 No |
Post New Answer View All Answers
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
Is c high or low level?
What is the difference between exit() and _exit() function in c?
Can a pointer be volatile in c?
What is a union?
Tell us the use of fflush() function in c language?
write a program to create a sparse matrix using dynamic memory allocation.
What is the difference between int main and void main in c?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
With the help of using classes, write a program to add two numbers.
Write a program to reverse a linked list in c.
Explain null pointer.
What are the types of i/o functions?
How can I remove the trailing spaces from a string?
What is the use of bit field?