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
Explain the advantages and disadvantages of macros.
What is wrong in this statement?
Give me the code of in-order recursive and non-recursive.
List the difference between a "copy constructor" and a "assignment operator"?
What is the right type to use for boolean values in c? Is there a standard type?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
What are the two forms of #include directive?
What is cohesion and coupling in c?
What is the function of this pointer?
Write the Program to reverse a string using pointers.
Explain Function Pointer?
What does main () mean in c?
Explain how can I make sure that my program is the only one accessing a file?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What is difference between main and void main?