google.com, pub-6167773875660516, DIRECT, f08c47fec0942fa0 Write a c program to find the size of int float double and char - 2nd puc computer science

Write a c program to find the size of int float double and char

write a program to find the size of different data types available in c

Write a c program to find the size of int float double and char

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("Integer takes %d bytes\n",sizeof(int));
printf("Floating-point takes %d bytes\n",sizeof(float));
printf("Character takes %d byte\n",sizeof(char));
printf("Double takes %d bytes\n",sizeof(double));
getch();
}
Output:
Integer takes 2 bytes
Floating-point takes 4 bytes                                                    
Character takes 1 byte                                                          
Double takes 8 bytes  
Write a c program to find the size of int float double and char Write a c program to find the size of int float double and char Reviewed by Vision Academy on December 14, 2021 Rating: 5

No comments:

CheckOut

Powered by Blogger.