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
What is a program flowchart?
What is 1f in c?
In c language can we compile a program without main() function?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
How do you construct an increment statement or decrement statement in C?
Explain the Difference between the New and Malloc keyword.
Explain what is the difference between a free-standing and a hosted environment?
What is the difference between malloc calloc and realloc in c?
What is keyword in c?
write an algorithm to display a square matrix.
Is anything faster than c?
What is hash table in c?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What does == mean in texting?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year