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()
{
int a;
printf("%u\n",(int)(&a+1)-(int)(&a));
getch();
return 0;
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you initialize pointer variables?

1147


Difference between pass by reference and pass by value?

1208


i have a written test for microland please give me test pattern

2778


What is #define size in c?

1265


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

1155


Explain Function Pointer?

1240


What is a memory leak? How to avoid it?

1422


What is variable initialization and why is it important?

1334


What is variables in c?

1094


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2883


What are dangling pointers in c?

1350


Explain the use of bit fieild.

1196


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1127


Why is c called c?

1073


What are the types of assignment statements?

1110