What does sizeof (function(argument)) return?

后端 未结 4 697
滥情空心
滥情空心 2020-12-19 06:31

What will be the output of program

#include 

int fun(char *a){
    printf(\"%d\\n\",sizeof(a));
    return 1;
}

int main(){
    char a[20];
         


        
4条回答
  •  离开以前
    2020-12-19 07:32

    keyword sizeof followed by ellipsis returns the number of elements in a parameter pack.

    The type of the result is the unsigned integral type size_t defined in the header file

提交回复
热议问题