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

Write a program in c to replace any vowel in a string with z?

1091


How to establish connection with oracle database software from c language?

2161


What are the 4 data types?

983


What is meant by initialization and how we initialize a variable?

1015


Differentiate between the expression “++a” and “a++”?

1215


Why is %d used in c?

969


What are pointers? What are stacks and queues?

1088


What is the function of volatile in c language?

1086


Is c call by value?

978


I have seen function declarations that look like this

1004


What are valid operations on pointers?

1161


Are pointers integer?

971


how to find anagram without using string functions using only loops in c programming

3155


Can the “if” function be used in comparing strings?

997


Is null equal to 0 in sql?

1105