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 c program using for loop to print typical pattern if
number of rows is entered by keyboard.
ABCBA
AB BA
A A



Write a c program using for loop to print typical pattern if number of rows is entered by keyboard...

Answer / a.jayashree

#include<stdio.h>
#include<string.h>
main()
{
char a[5];
int i=0,j=0;
printf("enter the string");
scanf("%s",a);
printf("\n%s",a);
for(i=0;i<a[5];i++)
{
if(a[i]==a[2])
{
printf("\n\t");
}
else
{
printf("%s",a);
}
}
for(j=0;j<a[5];j++)
{
if(a[j]==a[1])
{
if(a[j]==a[2])
{
if(a[j]==a[3])
{
printf("\n\t\t\t");
}
else
{
printf("%s",a);
}
}
}
}
}

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More C Interview Questions

What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

0 Answers  


i want to job in your company, so how it will be possible.

3 Answers   TCS,


What does the characters “r” and “w” mean when writing programs that will make use of files?

0 Answers  


write a c programme for add of two numbers with out use of arthematic operators

2 Answers  


What functions are used in dynamic memory allocation in c?

0 Answers  


What is information technology.

1 Answers  


How can you restore a redirected standard stream?

0 Answers  


What is c method?

0 Answers  


Write a program to print fibonacci series without using recursion?

0 Answers  


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

0 Answers  


how can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0

4 Answers   Wipro,


Two's compliment of -5

4 Answers   Adobe,


Categories