Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is #define in c?

1055


What is dangling pointer in c?

1247


What is const keyword in c?

1169


Do array subscripts always start with zero?

1313


What is external variable in c?

1070


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

1286


What are the two types of structure?

1095


Explain the advantages of using macro in c language?

1006


can anyone suggest some site name..where i can get some good data structure puzzles???

2087


How can you find the day of the week given the date?

1206


What are the advantages of union?

1071


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2269


What is the general form of #line preprocessor?

1005


Why c is a mother language?

1047


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

1960