why do we use pointer instead directly acessing the data?
Answer Posted / manish
We use the pointer instead of the because of the fast
access of the data as pointer provides direct memory access.
Also, soemtimes passing the ;large structure variable in
the function argument requires large memoy stack but by
passing the pointer to the structure inside the function
will reduce the stack size.
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
write a program to find out prime number using sieve case?
What is your stream meaning?
How do I copy files?
Do pointers take up memory?
What is the collection of communication lines and routers called?
Explain modulus operator. What are the restrictions of a modulus operator?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
What is difference between union and structure in c?
What is structure packing in c?
When should the volatile modifier be used?
Explain what are binary trees?
Describe the header file and its usage in c programming?
Is struct oop?
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
Why doesn't C support function overloading?