Answer Posted / nirmal kumar tailor
c is a procedural language and C++ is object oriented
language
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
How the c program is executed?
Explain what happens if you free a pointer twice?
What is difference between constant pointer and constant variable?
Where are local variables stored in c?
What is the use of define in c?
What is an array in c?
how should functions be apportioned among source files?
What is LINKED LIST? How can you access the last element in a linked list?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
Is it acceptable to declare/define a variable in a c header?
What is array in C
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
How do I get a null pointer in my programs?
Why n++ execute faster than n+1 ?
how to construct a simulator keeping the logical boolean gates in c