for(i=1;i>0;i++);
printf("i=%d",i);
what will be the answer????
Answer Posted / ankit shekhavat
after for lop,there is a semicolon.it means loop terminate
here..condition inside the loop will always true.so it will
be an infinite loop..nothing will be printed on the screen.
for next statement there will be printed any garbage value...
| Is This Answer Correct ? | 7 Yes | 6 No |
Post New Answer View All Answers
What is difference between array and pointer in c?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
What is %g in c?
What is void c?
When we use void main and int main?
What is c language and why we use it?
Why is this loop always executing once?
What is the method to save data in stack data structure type?
find out largest elemant of diagonalmatrix
What are the parts of c program?
Can a pointer point to null?
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
What is the advantage of using #define to declare a constant?
How can I get the current date or time of day in a c program?