134k views
2 votes
7. Write a program in C to display the string "ARRAY" in the following format : A AR ARR ARRA ARRAY

1 Answer

5 votes
This program will the string array in the given format.

int main(void){
char arr[6];
int counter;
strcpy(arr[], "ARRAY");

for(counter=0; counter<6; counter++){
printf("%c", arr[counter]);
}

return 0;
)

Note: Do not forget to include all the necessary library that is needed to run this program.

User Ashish Sajwan
by
7.0k points