write a program for size of a data type without using
sizeof() operator?

Answer Posted / arun kumar mishra kiit univers

#include<stdio.h>
#include<conio.h>
void main()
{
float f1,*Ptr1,*Ptr2;
ptr1 = &fl;
ptr2 = (&fl+1);
printf("%u",(char *)ptr2-(char *)ptr1);
getch();
}

Is This Answer Correct ?    11 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you use a pointer to a function?

636


What is the difference between int main and void main?

576


Explain how do you sort filenames in a directory?

609


Write a program with dynamically allocation of variable.

606


Are pointers really faster than arrays?

567






What is a c token and types of c tokens?

592


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

657


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

1764


Difference between linking and loading?

696


the question is that what you have been doing all these periods (one year gap)

1621


while initialization of array why we use a[][2] why not a[2][]...?

1869


What are keywords in c with examples?

606


Is multithreading possible in c?

569


Explain what are the standard predefined macros?

654


What is string function in c?

541