Find out the value of partially initialized array - C Array

C examples for Array:Introduction

Description

Find out the value of partially initialized array

Demo Code

#include <stdio.h>
#define SIZE 4/*from www  . j  ava  2  s.  co m*/
int main(void)
{
    int some_data[SIZE] = {1492, 1066};
    int i;
    
    printf("%2s%14s\n",
           "i", "some_data[i]");
    for (i = 0; i < SIZE; i++)
        printf("%2d%14d\n", i, some_data[i]);
    
    return 0;
}

Result


Related Tutorials