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 TO PRINT THE FOLLOWING OUTPUTS USING FOR
LOOPS.

A) * B) *****
*** * *
***** * *
*****

Answer Posted / vutukuru

#include<stdio.h>
main()
{
int i,j,n=5;
clrscr();
for(i=0;i<n-4;i++)
{
printf("*");
}
printf("\n");
for(i=0;i<n-2;i++)
{
printf("*");
}
printf("\n");
for(i=0;i<n;i++)
{
printf("*");
}
getch();
}

Is This Answer Correct ?    18 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are local variables initialized to zero by default in c?

1044


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

3311


Explain how do you convert strings to numbers in c?

1076


#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }

1114


Why can arithmetic operations not be performed on void pointers?

1036


What does malloc () calloc () realloc () free () do?

1060


What is bss in c?

1093


What do you know about the use of bit field?

1043


Are enumerations really portable?

1020


Explain how can you determine the size of an allocated portion of memory?

1106


Give me the code of in-order recursive and non-recursive.

1368


what is a function method?give example?

2356


What should malloc() do?

1166


Is anything faster than c?

1010


Explain how do you search data in a data file using random access method?

1131