write a program for size of a data type without using
sizeof() operator?
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int integer[2],p;
float floating[2],q;
char character[2],r;
double doubling[2],s;
clrscr();
p=(integer+1)-integer;
q=(floating+1)-floating;
r=(character+1)-character;
s=(doubling+1)-doubling;
printf("the sizeof int is :%d",p);
printf("\nthe size of float is :%d",q);
printf("\nthe size of character is :%d",r);
printf("\nthe size of double is :%d",s);
getch();
}
thank u
| Is This Answer Correct ? | 5 Yes | 11 No |
Post New Answer View All Answers
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
Explain the Difference between the New and Malloc keyword.
shorting algorithmS
Can include files be nested?
How do we open a binary file in Read/Write mode in C?
What are valid operations on pointers?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
Why is it that not all header files are declared in every C program?
What are linked lists in c?
What is the function of volatile in c language?
What is the general form of #line preprocessor?
What is the method to save data in stack data structure type?
Explain is it better to bitshift a value than to multiply by 2?
What is int main () in c?
What is a floating point in c?