write a program for size of a data type without using
sizeof() operator?
Answer Posted / subham singh
1 #include<iostream>
2 using namespace std;
3 main()
4 {
5 int i;
6 int* p = &i;
7 int* q= p;
8 p++;
9 cout<<(char*)p-(char*)q<<endl;
10 }
11
~
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the advantage of an array over individual variables?
What are the 4 data types?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What is the use of gets and puts?
Define Array of pointers.
What is New modifiers?
explain what is fifo?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
Can stdout be forced to print somewhere other than the screen?
How can I prevent another program from modifying part of a file that I am modifying?
State the difference between realloc and free.
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
What is sizeof return in c?
Which header file is used for clrscr?
Can I initialize unions?