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
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
Explain the ternary tree?
Write the Program to reverse a string using pointers.
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What are volatile variables in c?
What is the process to generate random numbers in c programming language?
What are the similarities between c and c++?
What are pointers really good for, anyway?
What do you mean by c?
Lists the benefits of c programming language?
The statement, int(*x[]) () what does in indicate?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
What are bitwise shift operators in c programming?
Write a factorial program using C.
What does d mean?