Output for following program using for loop only
*
* *
* * *
* * * *
* * * * *
Answer Posted / 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 |
Post New Answer View All Answers
What is the purpose of main( ) in c language?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
In a switch statement, what will happen if a break statement is omitted?
Explain what is meant by high-order and low-order bytes?
Explain how can I open a file so that other programs can update it at the same time?
What is the meaning of c in c language?
largest Of three Number using without if condition?
Write a program to reverse a given number in c language?
Explain 'far' and 'near' pointers in c.
What is #define?
what is the structure pointer?
What is static memory allocation? Explain
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
How can I do serial ("comm") port I/O?