Write a Program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
use two nested loops.
Answer Posted / naman patidar
void main() {
int n = 5 ; // take use input here
int i, j;
for( i =1; i<=n; i++){
printf("\n *");
for(j=0; j<=i; j++){
printf(" *");
}
}
}
| Is This Answer Correct ? | 23 Yes | 22 No |
Post New Answer View All Answers
Tell me when is a void pointer used?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
What is the difference between declaring a variable by constant keyword and #define ing that variable?
What is n in c?
Explain what are multibyte characters?
What is the purpose of main() function?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
What is putchar() function?
Why pointers are used?
What is the use of ?
How can I change the size of the dynamically allocated array?
Explain what is the general form of a c program?
What is the difference between fread buffer() and fwrite buffer()?
Where are the auto variables stored?
What is the difference between if else and switchstatement