write a program for size of a data type without using
sizeof() operator?
Answer Posted / fanish
#include <stdio.h>
int main(){
printf("%d\n",((int*)0 + 1));
}
We can replace int with any other type
(Built-in/user-defined ) to get the size.
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are pointers? What are different types of pointers?
What is "Hungarian Notation"?
What is string concatenation in c?
What is exit() function?
What is the use of structure padding in c?
c program for searching a student details among 10 student details
What is difference between class and structure?
Why #include is used in c language?
What is meant by inheritance?
What is the right type to use for boolean values in c? Is there a standard type?
What are the advantages and disadvantages of pointers?
What is the purpose of macro in C language?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
What is the difference between new and malloc functions?
What is a example of a variable?