write a program for size of a data type without using
sizeof() operator?
Answer Posted / g
This code will work in TC with 2 warnings but can get result
void main()
{
char *Ptr1,*Ptr2;
float fl;
ptr1 = &fl;
ptr2 = (&fl+1);
printf("%u",ptr2-ptr1);
}
This is a way to get the size of data type...waiting for
any other way...
| Is This Answer Correct ? | 44 Yes | 26 No |
Post New Answer View All Answers
Explain the bubble sort algorithm.
How can you be sure that a program follows the ANSI C standard?
Do you have any idea how to compare array with pointer in c?
How do you initialize pointer variables?
Explain what is the difference between a free-standing and a hosted environment?
Can you write a programmer for FACTORIAL using recursion?
What is the maximum length of an identifier?
Explain modulus operator.
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
Explain the use of bit fieild.
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
How can I convert a number to a string?
What is pass by reference in functions?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
What is call by reference in functions?