Program to find larger of the two numbers without using if-else,while,for,switch
Answer Posted / vara
#include<stdio.h>
void main()
{
int a=4,b=5;
a>b?printf("a is greater than big"):b is pig
}
| Is This Answer Correct ? | 10 Yes | 25 No |
Post New Answer View All Answers
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
Is fortran still used in 2018?
What is the difference between formatted&unformatted i/o functions?
What is a const pointer?
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
Do you know pointer in c?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
What is function prototype in c language?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
What are predefined functions in c?
What is bss in c?
What is a list in c?
What is far pointer in c?
What are the uses of a pointer?
What is difference between structure and union with example?