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
Difference between linking and loading?
Is it possible to initialize a variable at the time it was declared?
Define C in your own Language.
What is a ternary operator in c?
What is type qualifiers?
What is null in c?
Explain what math functions are available for integers? For floating point?
What is integer constants?
Is it possible to pass an entire structure to functions?
Explain what will the preprocessor do for a program?
What is assert and when would I use it?
How to declare pointer variables?
Differentiate fundamental data types and derived data types in C.
What is a null pointer in c?
What is a constant?