how to find the size of the data type like int,float
without using the sizeof operator?

Answer Posted / anil arya

#define SIZEOF(type) (int)&((int *)0)[1])

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to show the change in position of a cursor using c

821


application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above

829


What are header files in c programming?

846


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

2153


Write a simple code fragment that will check if a number is positive or negative.

907


What is the purpose of sprintf() function?

805


Can a program have two main functions?

845


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

2152


What are loops c?

798


What is oops c?

852


What are the types of variables in c?

771


What is a good way to implement complex numbers in c?

788


What are compound statements?

836


What math functions are available for integers? For floating point?

851


What is meant by keywords in c?

835