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
Can we change the value of #define in c?
Explain modulus operator.
What is wrong in this statement?
What is the process of writing the null pointer?
What are the differences between Structures and Arrays?
What does 4d mean in c?
Differentiate between the = symbol and == symbol?
What is the use of function overloading in C?
What is the use of the function in c?
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.
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What does c in a circle mean?
What does void main () mean?
Why & is used in scanf in c?
What are the types of type qualifiers in c?