write a program to produce the following output;
ABCDEFGFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD DCBA
ABC CBA
AB BA
A A

Answer Posted / guriya kumari

#include<stdio.h>
void main()
{
int i,j,k,l,m;
for(i=0;i<=6;i++)
{
for(k=65;k<=71-i;k++)
printf("%c",k);
for(j=1;j<=i*2-1;j++)
printf(" ");
for(l=71-i;l>=65;l--){
if(l==71)
continue;
printf("%c",l);}
printf("\n");
}
}

Is This Answer Correct ?    26 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are examples of structures?

589


Explain how do you override a defined macro?

579


Is malloc memset faster than calloc?

607


What is variable declaration and definition in c?

495


How can I change their mode to binary?

690






Explain the Difference between the New and Malloc keyword.

684


How can I ensure that integer arithmetic doesnt overflow?

604


Is there any demerits of using pointer?

621


What are runtime error?

623


How main function is called in c?

622


What is sizeof int in c?

594


Combinations of fibanocci prime series

1105


Explain what are global variables and explain how do you declare them?

635


What is a node in c?

543


What are the parts of c program?

627