what is the code for getting the output as
*
**
***
Answer Posted / 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 |
Post New Answer View All Answers
What is scope rule in c?
Explain how do you print an address?
Write a program to check whether a number is prime or not using c?
Is main an identifier in c?
How do you use a 'Local Block'?
How do I create a directory? How do I remove a directory (and its contents)?
What is the right way to use errno?
Define and explain about ! Operator?
How many header files are in c?
What does & mean in scanf?
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
What is the difference between Printf(..) and sprint(...) ?
What is the difference between procedural and declarative language?
What is the significance of an algorithm to C programming?