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 |
what is difference between array of characters and string
please give code for this 1 2 4 7 11 16
Write a program to compare two strings without using the strcmp() function
42 Answers Accenture, Arba Minch University,
write a program that uses point of sale system. which are mainly used by retail markets, where the is a database inventory list, a slip should be printed for the customer. manage should be able to access what has been sold and what is left from stock?
write a program to gat the digt sum of a number (et. 15= >1+5=6)
Here is a neat trick for checking whether two strings are equal
struct abc { unsigned int a; char b; float r; }; struct xyz { int u; struct abc tt; }ww; ww = (struct xyz*)malloc(sizeof(struct xyz)); will the memory be allocated for the inner structure also?
How to write in a function declaration and in function call in which the function has 'n' number of varible or arguments?
print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,getchar or putchar
the output will be #include<stdio.h> int main () { int i; i = 9/2; printf("%i",i); return 0; }
What is the usage of the pointer in c?
How does placing some code lines between the comment symbol help in debugging the code?