Algorithm and flowchart to find size of built in datatypes by using sizeof operator
Answers
Answer:
Sizeof is a much used operator in the C programming language. It is a compile time unary operator which can be used to compute the size of its operand. The result of sizeof is of unsigned integral type which is usually denoted by size_t.
Algorithm and flowchart to find size of built in datatypes by using sizeof operator
Algorithm:
- Start the programme with step one.
- To see the size of each datatype, use the "sizeof()" operator.
- Print the Fahrenheit value in step three.
- Stop the software at step four.
Program:
#include<stdio.h>
#include<conio.h>
void main()
{
double a;
clrscr();
printf("nSize of different datatypes in C");
printf("nSize of Integer : %d bytes",sizeof(int));
printf("nSize of Long : %d bytes",sizeof(long));
printf("nSize of Float : %d bytes",sizeof(float));
printf("nSize of Double : %d bytes",sizeof(a));
printf("nSize of Character : %d byte",sizeof(char));
printf("nSize of Unsigned Integer : %d bytes",sizeof(unsigned int));
getch();
}
#SPJ3