write a program for size of a data type without using
sizeof() operator?
Answer Posted / lalit kumar
#include "stdafx.h"
#include "stdio.h"
#include "conio.h"
int main()
{
char *a,*s, v='m';
a=&v;
s=a;
a++;
int intsize=(int)a-(int)s;
printf("%d",intsize);
getch();
return 0;
}
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
What are the advantages and disadvantages of pointers?
can we have joblib in a proc ?
Write a program to reverse a given number in c?
What is data structure in c and its types?
What are register variables in c?
What is difference between Structure and Unions?
What is the difference between functions getch() and getche()?
What are structures and unions? State differencves between them.
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
Why we use break in c?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
Do you have any idea how to compare array with pointer in c?
What is c mainly used for?