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

Explain the difference between ++u and u++?

0 Answers  


How to find the usage of memory in a c program

1 Answers   Infosys,


What is a null string in c?

0 Answers  


Give the logic for this #include<stdio.h> #include<conio.h> void main() { clrscr(); int a=10,b; b=++a + ++a; printf("%d", b); getch(); } Output: 24......How?

2 Answers   Accenture,


I want tcs placement papers of 2004-2009 , its urgent

6 Answers   TCS, Wipro,






What is extern variable in c with example?

0 Answers  


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

0 Answers  


Do pointers take up memory?

0 Answers  


f(char *p) { p=(char *)malloc(sizeof(6)); strcpy(p,"HELLO"); } main() { char *p="BYE"; f(p) printf("%s",p); } what is the output?

9 Answers   Hughes, Tech Mahindra,


int x=5; printf("%d%d%d",x,x<<2,x>>2);

2 Answers   TANCET,


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

0 Answers  


What is register variable in c language?

0 Answers  


Categories