how to find the size of the data type like int,float
without using the sizeof operator?
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int ptr,a[2];
char ptr1,b[2];
float ptr2,c[2];
ptr=(a+1)-a;
ptr1=(b+1)-b;
ptr2=(c+1)-c;
printf("int : %d\n",ptr);
printf("char : %d\n",ptr1);
printf('float : %d\n",ptr2);
getch();
}
than ku
| Is This Answer Correct ? | 0 Yes | 8 No |
Post New Answer View All Answers
What are header files and what are its uses in C programming?
Why & is used in scanf in c?
What is infinite loop?
Can a variable be both constant and volatile?
What are the advantages of using linked list for tree construction?
What is the purpose of ftell?
Explain union.
explain what are pointers?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
How can I generate floating-point random numbers?
Explain how can you restore a redirected standard stream?
What is sizeof int in c?
What is sizeof c?
What do you mean by invalid pointer arithmetic?
Is fortran faster than c?