how to find the size of the data type like int,float
without using the sizeof operator?

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
int ptr,a[2];
char ptr1,b[2];
float ptr2,c[2];
ptr=(a+1)-a;
ptr1=(b+1)-b;
ptr2=(c+1)-c;
printf("int : %d\n",ptr);
printf("char : %d\n",ptr1);
printf('float : %d\n",ptr2);
getch();
}


than ku

Is This Answer Correct ?    0 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to print fibonacci series using recursion?

824


Write a C program to count the number of email on text

1647


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1712


Is there sort function in c?

785


What does void main return?

837


Who invented bcpl language?

931


Can main () be called recursively?

879


What are c header files?

780


What's a good way to check for "close enough" floating-point equality?

846


What header files do I need in order to define the standard library functions I use?

750


What is function prototype in c with example?

770


Is there a way to switch on strings?

819


What is 2c dna?

826


write a program to find the given number is prime or not

4279


find the sum of two matrices and WAP for it.

881