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
What is the difference between pure virtual function and virtual function?
Hi can anyone tell what is a start up code?
Explain what are reserved words?
Is null always defined as 0(zero)?
How many identifiers are there in c?
What is the purpose of 'register' keyword in c language?
Why isn't it being handled properly?
What is the difference between constant pointer and constant variable?
How can this be legal c?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
What are the valid places to have keyword “break”?
List some of the static data structures in C?
i have a written test for microland please give me test pattern
What is a string?
Explain what is a 'locale'?