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 header files do I need in order to define the standard library functions I use?

0 Answers  


I have an array of 100 elements, each of which is a random integer. I want to know which of the elements: a) are multiples of 2 b) are multiples of 2 AND 5 c) have a remainder of 3 when divided by 7

1 Answers  


Why c is called a middle level language?

0 Answers  


How is = symbol different from == symbol in c programming?

0 Answers  


Why is extern used in c?

0 Answers  


How can I invoke another program or command and trap its output?

0 Answers  


main() { int a[10]; printf("%d",*a+1-*a+3); }

2 Answers  


c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

0 Answers  


write a program to read a number and print in words that is in sentence for example 21,219 then output is "twenty one thousand and two hundred nineteen" by using only control flow statements (only loops and switch case )?

1 Answers   TCS,


What is the use of the #include directive?

3 Answers  


What Is The Difference Between Null And Void Pointer?

0 Answers   TCS,


Explain zero based addressing.

0 Answers  


Categories