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
Explain spaghetti programming?
Explain about block scope in c?
What is build process in c?
Can we change the value of #define in c?
What is time complexity c?
When should I declare a function?
What are the __date__ and __time__ preprocessor commands?
What does s c mean on snapchat?
cavium networks written test pattern ..
What is the c value paradox and how is it explained?
What is a pointer on a pointer in c programming language?
What is a const pointer?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
What is context in c?
What is wrong with this code?