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
How can I insert or delete a line (or record) in the middle of a file?
Can a void pointer point to a function?
What is a const pointer in c?
What are reserved words with a programming language?
What does the characters “r” and “w” mean when writing programs that will make use of files?
What is a struct c#?
Subtract Two Number Without Using Subtraction Operator
Explain About fork()?
What are control structures? What are the different types?
What is pre-emptive data structure and explain it with example?
Write a program to print all permutations of a given string.
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
What's the difference between constant char *p and char * constant p?
What does it mean when a pointer is used in an if statement?
c language interview questions & answer