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 / kapil

#include<stdio.h>
void main()
{
int i=0,j=1;
while(i<3)
{
while(j<=7)
{
if(j-i==4||j+i==4)
printf("*");
else
printf(" ");
j++;
}
printf("\n");
i++;
j=1;
}
while(j<=7)
{
printf("*");
j++;
}
}

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c still so popular?

1042


What is conio h in c?

1047


What is a substring in c?

1032


Explain what is the difference between a string and an array?

1164


How does struct work in c?

1081


Write a program to reverse a given number in c?

1036


How does free() know explain how much memory to release?

1052


What is page thrashing?

1081


What is the difference between declaring a variable and defining a variable?

1270


what do you mean by enumeration constant?

1011


What does do in c?

1039


Are the variables argc and argv are always local to main?

1020


What is the difference between int main and void main?

1045


What is hashing in c language?

1302


How can this be legal c?

1084