what is the code for getting the output as
*
**
***
Answers were Sorted based on User's Feedback
Answer / gg
#include<stdio.h>
main()
{
int n,i=0,j=0;
printf("Enter an intger : ");//upto n nof *'s
scanf("%d",&n);
while(j<n)
{
for(i=0;i<=j;printf("*"),i++);
printf("\n",j++);
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sourisengupta
void main()
{
int i,j;
for(i=0;i<3;i++){
for(j=0;j<i;j++){
printf("*");
printf("\n");
}
}
}
| Is This Answer Correct ? | 1 Yes | 4 No |
Answer / pooja sonawane
void main()
{
int i,j;
for(i=0;i<3;i++)
printf("\n");
for(j=0;j<i;j++)
printf("*");
}
| Is This Answer Correct ? | 2 Yes | 6 No |
Explain how can a program be made to print the line number where an error occurs?
How do you search data in a data file using random access method?
What are the scope of static variables?
main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }
Can you please compare array with pointer?
What are the advantages of external class?
Find occurence of a character in a sting.
why effort estimation is important?
Do you know the use of fflush() function?
Explain the use of 'auto' keyword
What is %d called in c?
Explain function pointer with exapmles.