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 / lalit kumar

#include "stdafx.h"
#include "stdio.h"
#include "conio.h"
int main()
{
char *a,*s, v='m';
a=&v;
s=a;
a++;
int intsize=(int)a-(int)s;
printf("%d",intsize);
getch();
return 0;
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can a process change an environment variable in its caller?

1192


When can you use a pointer with a function?

1081


What is data structure in c and its types?

1073


What is new line escape sequence?

1358


Why we use void main in c?

1178


What is oops c?

1259


why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above

1091


What is the difference between union and anonymous union?

1314


Explain what are the standard predefined macros?

1123


Explain high-order bytes.

1125


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

1773


Which is the memory area not included in C program? give the reason

1951


What's the difference between constant char *p and char * constant p?

1153


What are the types of unary operators?

1194


Where can I get an ansi-compatible lint?

1155