Can U write a C-program to print the size of a data type
without using the sizeof() operator? Explain how it works
inside ?
Answer Posted / rajesh
#include<stdio.h>
int main()
{
int p;
printf("%d\n",(char*)(&p+1)-(char*)(&p));
return 0;
}
Is This Answer Correct ? | 8 Yes | 3 No |
Post New Answer View All Answers
What does nil mean in c?
How can I split up a string into whitespace-separated fields?
How will you write a code for accessing the length of an array without assigning it to another variable?
What is function and its example?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
State two uses of pointers in C?
can any one tel me wt is the question pattern for NIC exam
what are the advantages of a macro over a function?
p*=(++q)++*--p when p=q=1 while(q<=6)
Are enumerations really portable?
What is meant by realloc()?
What are loops in c?
What is the code in while loop that returns the output of given code?
Explain what does it mean when a pointer is used in an if statement?
Why string is used in c?