write a program to produce the following output;
ABCDEFGFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD DCBA
ABC CBA
AB BA
A A
Answer Posted / vinay
main()
{
int i,n=65,m=72,f=0,s=-6;
while(m-->=n)
{s+=4;
for(i=n;i<m;i++)
printf("%c ",i);
if(f==0) ++m;
else
for(i=0;i<s;i++) printf(" ");
for(i=m-1;i>=n;i--)
printf("%c ",i);
printf("\n");f=1;
}
system("pause");
}
| Is This Answer Correct ? | 7 Yes | 6 No |
Post New Answer View All Answers
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
in linking some of os executables are linking name some of them
How can I ensure that integer arithmetic doesnt overflow?
Explain how can you tell whether a program was compiled using c versus c++?
How does placing some code lines between the comment symbol help in debugging the code?
What is n in c?
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
What is difference between function overloading and operator overloading?
List some of the static data structures in C?
What are the different types of constants?
Explain how can I open a file so that other programs can update it at the same time?
Why we use break in c?
What is a macro in c preprocessor?
Explain which function in c can be used to append a string to another string?