c types size via sizeof() method

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <uuid/uuid.h>
#include <string.h>
#include <stdbool.h>

void typesSize();

int main()
{
    typesSize();
}

void typesSize()
{
    printf("size of char=%ld\n", sizeof(char));
    printf("size of int=%ld\n", sizeof(int));
    printf("size of double=%ld\n", sizeof(double));
    printf("size of bool=%ld\n", sizeof(bool));
}

 

 

posted @ 2021-11-22 09:17  FredGrit  阅读(26)  评论(0编辑  收藏  举报