program for following output using for loop?
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
Answer Posted / atul shukla
#include<stdio.h>
void main()
{
int i,j;
for (i=1;i<=5;i++)
{
for(j=i;j<=5;j++)
printf("%d ",j);
printf("\n");
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is header file in c?
How do we make a global variable accessible across files? Explain the extern keyword?
Explain how can I convert a number to a string?
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
How can I open files mentioned on the command line, and parse option flags?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
What does c in a circle mean?
What is c standard library?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
Write a program to maintain student’s record. Record should
not be available to any unauthorized user. There are three
(3) categories of users. Each user has its own type. It
depends upon user’s type that which kind of operations user
can perform. Their types and options are mentioned below:
1. Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record)
2. Super Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record, Delete Single Record)
3. Guest
(Search Record [by Reg. No or Name], View All Records)
When first time program runs, it asks to create accounts.
Each user type has only 1 account (which means that there
can be maximum 3 accounts). In account creation, following
options are required:
Login Name: <6-10 alphabets long, should be unique>
Password: <6-10 alphabets long, should not display
characters when user type>
Confirm Password:
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
How pointers are declared?
What happens if a header file is included twice?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
Is c weakly typed?