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...

Can U write a C-program to print the size of a data type
without using the sizeof() operator? Explain how it works
inside ?

Answer Posted / rajesh

#include<stdio.h>
int main()
{
int p;

printf("%d\n",(char*)(&p+1)-(char*)(&p));
return 0;
}

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is event driven software and what is procedural driven software?

2566


All technical questions

1987


How can a number be converted to a string?

1322


I need previous papers of CSC.......plz help out by posting them.......

2286


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

1100


What is array within structure?

1115


What is variable and explain rules to declare variable in c?

1085


Explain a file operation in C with an example.

1119


Can include files be nested? How many levels deep can include files be nested?

1152


What are the benefits of c language?

1174


Why does everyone say not to use gets?

1099


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2445


What’s a signal? Explain what do I use signals for?

1105


Which built-in library function can be used to match a patter from the string?

1297


What is #include cctype?

1117