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

a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

1011


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

1015


Why doesnt this code work?

1005


What is n in c?

976


What are the 5 elements of structure?

1040


Describe dynamic data structure in c programming language?

1038


What is a spanning Tree?

1501


Is main is a keyword in c?

1071


What are predefined functions in c?

1021


What is the difference between far and near in c?

996


How we can insert comments in a c program?

1069


What are categories used for in c?

1034


Differentiate between a for loop and a while loop? What are it uses?

1131


Hai what is the different types of versions and their differences

1896


When is a void pointer used?

1191