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

Write a C program to convert an integer into a binary string?

1 Answers  


What is a spanning Tree?

1 Answers   TCS,


what is Array?

3 Answers  


What does the error message "DGROUP exceeds 64K" mean?

0 Answers   Celstream,


5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.

0 Answers  


HOW TO ANSWER IF ASKED " WHAT KIND OF A PERSON ARE YOU?" I NEED AN ANSWER THAT IMPRESS THE INTERVIEWER

4 Answers  


What is realloc in c?

0 Answers  


wtite a program that will multiply two integers in recursion function

4 Answers   TCS,


How to implement call back functions ?

3 Answers   HP,


What is the use of c language in real life?

0 Answers  


how to set Nth bit of variable by using MACRO

3 Answers   HCL,


Write a c program to Find the name that you entered is male name or female name? Such as Sunjay is name of male and Payal is name of female

5 Answers   Infosys, Luminous,


Categories