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

Explain what standard functions are available to manipulate strings?

0 Answers  


What is the use of bitwise operator?

0 Answers  


What is the use of define in c?

0 Answers  


Please write the area of a RIGHT ANGLED TRIANGLE.

1 Answers  


how can i get the string which is having two spaces at the end.suppose the string is "Hello World ".Now at the end i have two spaces.i need to print with that spaces .

1 Answers  






find out largest elemant of diagonalmatrix

0 Answers  


Define function ?Explain about arguments?

2 Answers   Geometric Software, Infosys,


How can I make it pause before closing the program output window?

0 Answers  


why we are using semicolon at the end of printh statment

2 Answers   HCL,


What is key word in c language?

4 Answers   ABC,


Describe the order of precedence with regards to operators in C.

0 Answers  


Explain what does the function toupper() do?

0 Answers  


Categories