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
Is multithreading possible in c?
What is preprocessor with example?
List the different types of c tokens?
Explain the ternary tree?
What is data structure in c programming?
Is null a keyword in c?
How do I get an accurate error status return from system on ms-dos?
Write the control statements in C language
How many levels of indirection in pointers can you have in a single declaration?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
Is c is a low level language?
Is javascript written in c?