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
*
* *
* *
*******



Write a program in c to print * * * * * *******..

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

More C Interview Questions

How to run c Program without using IDE of c. means if program made in notepad.then how to compile by command prompt.

1 Answers   HP, TCS,


Discuss similarities and differences of Multiprogramming OS and multiprocessing OS?

4 Answers   TCS,


How to use c/c++ code in JAVA

10 Answers   CDAC, IBM, Satyam, Scope International,


What is the meaning of ?

0 Answers  


Explain what is a pragma?

0 Answers  


what is the little endian and big endian?

1 Answers  


a 'c' program to tell that the set of three coordinates lie on a same line

3 Answers   Persistent,


What is the mean of function?

0 Answers  


What are data breakpoints?

3 Answers   Adobe,


Which header file is essential for using strcmp function?

0 Answers  


What is the size of structure in c?

0 Answers  


How to add two numbers without using semicolon at runtime

2 Answers  


Categories