what is the difference between declaration ,defenetion and
initialization of a variable?
Answer Posted / gg
As i know.....
Definition is one which allocates memory.
Ex: int x;
Declaration never occupy any memory space.
Ex:Function prototype declarations such as....
int func(int,int);
Initialization: If any variable assigned with some value at
time definition itself is called initialization.
Ex:int x=0;
Is This Answer Correct ? | 35 Yes | 7 No |
Post New Answer View All Answers
What is function prototype?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
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 you construct an increment statement or decrement statement in C?
Write a c program to demonstrate character and string constants?
What is #line used for?
Do pointers store the address of value or the actual value of a variable?
what is recursion in C
What is the purpose of void pointer?
How can I automatically locate a programs configuration files in the same directory as the executable?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What are variables and it what way is it different from constants?
What is structure of c program?
What are valid operations on pointers?
Where define directive used?