code snippet for creating a pyramids triangle
ex
1
2 2
3 3 3
Answer Posted / manvi
main()
{
int i,j,n;
printf("enter the limit");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=0;j<i;j++)
{
printf("%d",i);
}
printf("\n");
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
Is there any possibility to create customized header file with c programming language?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
What is merge sort in c?
Explain how does free() know explain how much memory to release?
How can I swap two values without using a temporary?
What is the usage of the pointer in c?
What is bubble sort technique in c?
Difference between malloc() and calloc() function?
Can you please explain the difference between malloc() and calloc() function?
Write a program to swap two numbers without using third variable?
How do you search data in a data file using random access method?
Is main a keyword in c?
What are high level languages like C and FORTRAN also known as?