Answer Posted / sreehari
main() function is user-defined function. Before knowing the
reason, we should know one thing is we can use predefined
function and get the result but we never write code for
predefined functions explicitly na....and we use to write
the code of main function for our desires.
Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What are the different types of C instructions?
How can I get the current date or time of day in a c program?
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
Which header file is essential for using strcmp function?
What does c in a circle mean?
Can we increase size of array in c?
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
What is the advantage of an array over individual variables?
What are the 3 types of structures?
Place the #include statement must be written in the program?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
Why c is a mother language?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
What are nested functions in c?