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
Which is better oop or procedural?
how to write a c program to print list of fruits in alpabetical order?
How can I change the size of the dynamically allocated array?
How do you generate random numbers in C?
What are the types of i/o functions?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
What are terms in math?
Write a program that accept anumber in words
All technical questions
State two uses of pointers in C?
what do u mean by Direct access files? then can u explain about Direct Access Files?
Explain what are preprocessor directives?
Explain why can’t constant values be used to define an array’s initial size?
What is a char c?