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
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
What is the use of a conditional inclusion statement in C?
How old is c programming language?
How can I find the modification date of a file?
What is the advantage of c?
How do you determine the length of a string value that was stored in a variable?
What is a program flowchart and how does it help in writing a program?
What does == mean in texting?
What’s the special use of UNIONS?
What is #define used for in c?
Which is an example of a structural homology?
How can I read/write structures from/to data files?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
Is null always equal to 0(zero)?
Explain the difference between exit() and _exit() function?