Tell me a C program to display the following Output?
1 1 1 1 1
2 2 2 2
3 3 3
4 4
5
Answer Posted / sreesen@ymail.com
#include<stdio.h>
void main()
{
int i,j,k=5;
for(i=1;i<=5;i++)
{
for(j=k;j<=0;j--)
{
printf("%d",i);
}
printf(""\n);
k--;
}
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Explain how can I convert a number to a string?
How can I remove the trailing spaces from a string?
Why we use break in c?
Is c language still used?
Differentiate between null and void pointers.
Explain what is wrong in this statement?
What are the __date__ and __time__ preprocessor commands?
What is variable initialization and why is it important?
Explain modulus operator.
#include
How will you declare an array of three function pointers where each function receives two ints and returns a float?
What is the use of sizeof?
what is recursion in C
What is the use of #include in c?
Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer