write a program to produce the following output;
ABCDEFGFEDCBA
ABCDEF FEDCBA
ABCDE EDCBA
ABCD DCBA
ABC CBA
AB BA
A A
Answer Posted / vipandeep
#include<stdio.h>
main()
{
int i,j,k,x,n=-2;
i=71;
while (i>=65)
{
for(j=65;j<=i;j++)
{
printf("%c ",j);
}
if(i!=71)
{
for(x=1;x<=n;x++)
{
printf(" ");
}
}
for(k=i;k>=65;k--)
{
if (k==71)
continue;
printf("%c ",k);
}
i--;
n=n+4;
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 20 Yes | 4 No |
Post New Answer View All Answers
Describe the steps to insert data into a singly linked list.
Tell me when is a void pointer used?
What is a nested loop?
Why is it that not all header files are declared in every C program?
When was c language developed?
What is structure packing in c?
What is the g value paradox?
Is Exception handling possible in c language?
What is the explanation for cyclic nature of data types in c?
Write the Program to reverse a string using pointers.
Is it better to bitshift a value than to multiply by 2?
What is modifier & how many types of modifiers available in c?
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
regarding pointers concept
What is the right way to use errno?