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 in c to print ****
* *
* *
****

Answer Posted / rajkumar

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
for(i=0;i<=3;i++)
{
printf("*");
}
for(i=4;i<5;i++)
{
printf(" ");
}
for(i=5;i<6;i++)
{
printf("*");
}
for(i=6;i<7;i++)
{
printf(" ");
}
for(i=7;i<8;i++)
{
printf("*");
}
for(i=8;i<9;i++)
{
printf(" ");
}
for(i=9;i<10;i++)
{
printf("*");
}
for(i=10;i<11;i++)
{
printf(" ");
}
for(i=11;i<12;i++)
{
printf("*");
}
for(i=12;i<13;i++)
{
printf(" ");
}
for(i=12;i<=15;i++)
{
printf("*");
}
getch();
}

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I manipulate strings of multibyte characters?

1077


can we change the default calling convention in c if yes than how.........?

2471


in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above

975


What is the modulus operator?

1152


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2639


I have seen function declarations that look like this

994


What are the 5 data types?

1049


Which is best linux os?

972


What are types of structure?

1065


Explain what is the difference between the expression '++a' and 'a++'?

1153


Which one would you prefer - a macro or a function?

1034


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1917


Calculate 1*2*3*____*n using recursive function??

1982


Why doesnt this code work?

1006


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

2121