write a program for size of a data type without using
sizeof() operator?
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int integer[2],p;
float floating[2],q;
char character[2],r;
double doubling[2],s;
clrscr();
p=(integer+1)-integer;
q=(floating+1)-floating;
r=(character+1)-character;
s=(doubling+1)-doubling;
printf("the sizeof int is :%d",p);
printf("\nthe size of float is :%d",q);
printf("\nthe size of character is :%d",r);
printf("\nthe size of double is :%d",s);
getch();
}
thank u
| Is This Answer Correct ? | 5 Yes | 11 No |
Post New Answer View All Answers
Does c have circular shift operators?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
how can f be used for both float and double arguments in printf? Are not they different types?
Explain what is the best way to comment out a section of code that contains comments?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
Explain high-order bytes.
What is the purpose of sprintf?
What are the applications of c language?
What is wrong with this initialization?
How can a string be converted to a number?
In c programming language, how many parameters can be passed to a function ?
Is c still used?
What is the purpose of main( ) in c language?
What are the advantages of using macro in c language?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include