What is the Difference between Class and Struct?

Answer Posted / revathy

no functions in structures
member functions are available in class

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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;ia1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }

2710


Which programming language is best for getting job 2020?

605


What is a keyword?

740


Explain do array subscripts always start with zero?

754


Who invented b language?

911






How is pointer initialized in c?

581


What is pivot in c?

564


What are the different types of constants?

638


Is main is a keyword in c?

602


explain what are pointers?

615


What is the ANSI C Standard?

775


Why is c called a mid-level programming language?

720


What are the header files used in c language?

583


What does a function declared as pascal do differently?

603


What is the use of pointers in C?

612