write a program for size of a data type without using
sizeof() operator?
Answer Posted / tishu
#include<stdio.h>
void main()
{
long int i,j,k;
printf("Enter a number");
scanf("%d",&i);
if(-32768<i && i<32767)
j=i*i;
k=j/(j/2);
printf("%d",k);
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
What is the difference between void main and main in c?
How can I automatically locate a programs configuration files in the same directory as the executable?
What are the header files used in c language?
What is the purpose of void pointer?
What is a char in c?
Write a program to print “hello world” without using semicolon?
What is an operator?
What is the use of typedef in c?
Describe static function with its usage?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
What does %d do?
What are near, far and huge pointers?
find out largest elemant of diagonalmatrix
What is character set?