Output for following program using for loop only
*
* *
* * *
* * * *
* * * * *

Answers were Sorted based on User's Feedback



Output for following program using for loop only * * * * * * * * * * * * * * *..

Answer / sjyamsunderreddy.beemudi

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("*");
}
printf(\n);
}
getch();
}

Is This Answer Correct ?    8 Yes 0 No

Output for following program using for loop only * * * * * * * * * * * * * * *..

Answer / 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

Output for following program using for loop only * * * * * * * * * * * * * * *..

Answer / sampath

for(i=0;i<=5;i++){
for(j=i;j<=i;j++)
printf("*");
printf("\n");
}

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

What is the difference between variable declaration and variable definition in c?

0 Answers  


1. Write a program to reverse every second word in a given sentence.

1 Answers  


What is variable declaration and definition in c?

0 Answers  


What is the difference between exit() and _exit() function in c?

0 Answers  


Explain the process of converting a Tree into a Binary Tree.

0 Answers   Ignou,






How can I swap two values without using a temporary?

0 Answers  


difference between c and c++

3 Answers  


Why doesnt that code work?

0 Answers  


what is the function of pragma directive in c?

0 Answers  


Is double link list a linear data structure? If Yes, Why?If No, Why?

4 Answers  


Is the following code legal? struct a { int x; struct a b; }

4 Answers  


What is %g in c?

0 Answers  


Categories