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 pointer. What are function pointers in C?
Why do we use c for the speed of light?
write a program fibonacci series and palindrome program in c
How do I use void main?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
How can I remove the trailing spaces from a string?
Can static variables be declared in a header file?
How old is c programming language?
What is ctrl c called?
If fflush wont work, what can I use to flush input?
What is difference between union All statement and Union?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
what is stack , heap ,code segment,and data segment