Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can you apply link and association interchangeably?

1178


What is getch c?

1344


What are header files in c programming?

1182


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1148


What is file in c preprocessor?

1197


Explain what is the benefit of using enum to declare a constant?

1133


In C programming, how do you insert quote characters (‘ and “) into the output screen?

1580


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

1330


Why doesnt that code work?

1278


How can I discover how many arguments a function was actually called with?

1114


What is the purpose of & in scanf?

1122


Are global variables static in c?

1218


Can an array be an Ivalue?

1138


Is a house a mass structure?

1154


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

1109