This repository has been archived on 2025-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-09-20 14:17:13 +03:00

27 lines
542 B
C

#include <stdio.h>
int main() {
int mark[5] = {19, 10, 8, 17, 9};
char word[10] = {'c','o','d','e','\0'};
int i;
// print the first element of the array
printf("%d\n", mark[0]);
// print the third element of the character array
printf("%c\n", word[2]);
// print ith element of the array
i = 5;
printf("%d\n", mark[i-1]);
// print an element outside of the array
printf("%d\n", mark[5]);
/* There are no ending character
in arrays of numbers */
// print the string
printf("%s\n", word);
return 0;
}