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
Can you apply link and association interchangeably?
What is getch c?
What are header files in c programming?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is file in c preprocessor?
Explain what is the benefit of using enum to declare a constant?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
Why doesnt that code work?
How can I discover how many arguments a function was actually called with?
What is the purpose of & in scanf?
Are global variables static in c?
Can an array be an Ivalue?
Is a house a mass structure?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above