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

Is multithreading possible in c?

955


What is preprocessor with example?

1006


List the different types of c tokens?

1017


Explain the ternary tree?

972


What is data structure in c programming?

1042


Is null a keyword in c?

1148


How do I get an accurate error status return from system on ms-dos?

1081


Write the control statements in C language

1140


How many levels of indirection in pointers can you have in a single declaration?

1037


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

1250


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.

2785


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

1451


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

6750


Is c is a low level language?

1077


Is javascript written in c?

1028