program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
Answer Posted / jayaraj.s
#include <stdio.h>
main()
{
int a,b,i=1;
for(a=i;a<=5;a++)
{
for(b=a;b<=5;b++)
{
printf("%d",b);
}
printf("\n");
i++;
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you mean by Recursion Function?
What is malloc and calloc?
Why use int main instead of void main?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
What is the method to save data in stack data structure type?
What are examples of structures?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
Can you tell me how to check whether a linked list is circular?
Not all reserved words are written in lowercase. TRUE or FALSE?
What is difference between && and & in c?
What is || operator and how does it function in a program?
What are the different types of linkage exist in c?
Explain how can I right-justify a string?