sizeof fn
#include <stdio.h>
int main() {
// Write C code here
int*ptr;
// ptr = malloc( 6 * 4);//memory alloc
ptr = malloc( 6 * sizeof(int));
printf("The size of int is %d\n" , sizeof(int));//will give memory size of int
printf("The size of char is %d\n" , sizeof(char));
printf("The size of float is %d\n" , sizeof(float));
printf("The size of long float is %d\n" , sizeof(long));
return 0;
}
Comments
Post a Comment