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

When c language was developed?

1056


What are the advantages of Macro over function?

1998


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

1098


What are the 4 types of unions?

1034


Why is C language being considered a middle level language?

1116


What is ponter?

1265


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

1155


what is the syallabus of computer science students in group- 1?

2315


Differentiate between new and malloc(), delete and free() ?

1176


What is union in c?

1113


How can I pad a string to a known length?

1031


Explain union.

1164


code for quick sort?

2025


What are the two forms of #include directive?

1158


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1097