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 / tishu

#include<stdio.h>
void main()
{
long int i,j,k;
printf("Enter a number");
scanf("%d",&i);
if(-32768<i && i<32767)
j=i*i;
k=j/(j/2);
printf("%d",k);
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

1309


Does c have class?

1057


What is oops c?

1133


Explain 'far' and 'near' pointers in c.

1093


What are control structures? What are the different types?

1046


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

2095


Is calloc better than malloc?

978


What are the standard predefined macros?

1083


What is a pointer and how it is initialized?

1094


Is javascript written in c?

1028


Should I learn c before c++?

1184


regarding pointers concept

1989


Is it acceptable to declare/define a variable in a c header?

1066


Why is %d used in c?

969


show how link list can be used to repersent the following polynomial i) 5x+2

2206