how to find the size of the data type like int,float
without using the sizeof operator?
Answer Posted / abhishek pathak mnnit
#include <stdio.h>
#define sizeof(x) ((void *)(&x + 1) - (void *)(&x))
void main()
{
int a;
printf("int size=%d",sizeof(a));
}
Is This Answer Correct ? | 3 Yes | 8 No |
Post New Answer View All Answers
What is indirection? How many levels of pointers can you have?
How do you print only part of a string?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
Explain the difference between malloc() and calloc() function?
What is the purpose of 'register' keyword in c language?
What is the difference between malloc() and calloc()?
What is calloc malloc realloc in c?
What are linked lists in c?
Why shouldn’t I start variable names with underscores?
Which header file is used for clrscr?
What is volatile variable in c with example?
Define recursion in c.
How many types of operators are there in c?
How will you find a duplicate number in a array without negating the nos ?
Did c have any year 2000 problems?