A B C D E F G F E D C B A
A B C D E F F E D C B A
A B C D E E D C B A
A B C D D C B A
A B C C B A
A B B A
A A

Answers were Sorted based on User's Feedback



A B C D E F G F E D C B A A B C D E F F E D C B A A B C D E E D C B A A B C D ..

Answer / varun arora

#include <stdio.h>

int main(void)
{
int i, j, k;
char ch;

i = 0;
while(i <= 5)
{
j = 5;
ch = 'A';
printf("\n");
while(j >= i)
{
printf("%c", ch);
j--;
ch++;
}
j = 1;
while(j <= (2 * i - 1))
{
printf(" ");
j++;
}
if(i == 0) ch -= 2;
else ch--;
while(ch >= 'A')
{
printf("%c", ch);
ch--;
}
i++;
}

return 0;
}

Is This Answer Correct ?    0 Yes 1 No

A B C D E F G F E D C B A A B C D E F F E D C B A A B C D E E D C B A A B C D ..

Answer / karthikeyan.skcet

main()
{
int i,j,x,k,c=0;
for(i=71;i>=65;i--)
{
for(j=65; j<=i;j++)
printf("%5c",j);
if(i==70)
c=5;
for(x=1;x<=c;x++)
printf(" ");
if i==71)
for(k=i-1;k>=65;k--)
printf("%5c",k);
else
for( k=1;k>=65;k--)
print("%5c",k);
c= c+10;
printf("\n");
}
}

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More C Interview Questions

Can we declare variables anywhere in c?

0 Answers  


What is the correct code to have following output in c using nested for loop?

0 Answers  


How can I direct output to the printer?

0 Answers  


What is meaning of tree

0 Answers  


What is variable in c with example?

1 Answers  






what is c language?

2 Answers  


what will be the output of this program main() { int i=1; while (i<=10); { i++; } }

11 Answers  


write a program to fined second smallest and largest element in a given series of elements (without sorting)

9 Answers   Yahoo,


Explain what is the advantage of a random access file?

0 Answers  


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

0 Answers   Google, Infosys,


What are loops in c?

0 Answers  


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

0 Answers   Zoho,


Categories