Output for following program using for loop only
*
* *
* * *
* * * *
* * * * *
Answer Posted / dhruv sharma rkdf
#include<stdio.h>
#include<conio.h>
void main(){
int i,j;
clrscr();
for(i=1;i<=5;i++){
for(j=i;j>0;j--){
printf("*");
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Wt are the Buses in C Language
Create a simple code fragment that will swap the values of two variables num1 and num2.
Is it possible to use curly brackets ({}) to enclose single line code in c program?
write a program to display all prime numbers
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
What is the explanation for prototype function in c?
What does the c in ctime mean?
Explain pointer. What are function pointers in C?
Explain what are the different file extensions involved when programming in c?
What is queue in c?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
How can I do graphics in c?
Why do we use namespace feature?
What is the difference between array and linked list in c?