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 is the benefit of using #define to declare a constant?
What is the concatenation operator?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
What library is sizeof in c?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
How do you define a function?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What is the size of array float a(10)?
Why header files are used?
What are the different types of C instructions?
What is an example of structure?
Why functions are used in c?
Write a program to print all permutations of a given string.
What is use of #include in c?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above