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
int far *near * p; means
What does the message "automatic aggregate intialization is an ansi feature" mean?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
List the different types of c tokens?
What is string function c?
Is c dynamically typed?
What is a header file?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
What is the difference between text and binary i/o?
What is the maximum no. of arguments that can be given in a command line in C.?
Why c is called object oriented language?
What is time null in c?
How would you obtain the current time and difference between two times?
How can I open a file so that other programs can update it at the same time?
Explain what are multibyte characters?