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

Can we change the value of #define in c?

588


Explain modulus operator.

600


What is wrong in this statement?

608


What is the process of writing the null pointer?

611


What are the differences between Structures and Arrays?

614






What does 4d mean in c?

951


Differentiate between the = symbol and == symbol?

720


What is the use of function overloading in C?

684


What is the use of the function in c?

602


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

2686


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

636


What does c in a circle mean?

585


What does void main () mean?

738


Why & is used in scanf in c?

629


What are the types of type qualifiers in c?

652