c-programming:functions:compound-literals
Compound Literals
#include <stdio.h> void show(int n, int a[n]) { for(int i = 0; i < n; i++) printf("%d ", a[i]); printf("\n"); } int main() { // Compound literal: an unnamed array that is created "on the fly" by simply // specifying which elements it contains. // A compound literal resembles a cast applied to an initializer show(5, (int []){10, 20, 30, 40, 50}); return 0; }
c-programming/functions/compound-literals.txt · آخرین ویرایش: 2024/04/19 17:57 توسط pejman
