write a program for size of a data type without using
sizeof() operator?
Answer Posted / learner
#include<stdio.h>
void main()
{
char *ptr1,*ptr2;
char fl;//float,double,int
ptr1 = &fl;//it will take the address of f1
ptr2 = (&fl+1);//it wil increment the address with according thr memory size
printf("%u",(char *)ptr2-(char *)ptr1);//explicit type casting for pointers
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Write a Program to find whether the given number or string is palindrome.
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
Explain the use of keyword 'register' with respect to variables.
How to write c functions that modify head pointer of a linked list?
What are the disadvantages of a shell structure?
What is variable declaration and definition in c?
explain what are pointers?
What is main function in c?
Why structure is used in c?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
What is the best way of making my program efficient?
What does s c mean in text?
Why header file is used in c?
what is recursion in C