char S;
char S[6]= " HELLO";
printf("%s ",S[6]);
output of the above program ?
(0, ASCII 0, I,unpredictable)
Answer Posted / divakar & venkatesh
u will get the following error
conflicting types for 'S'
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
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
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
What is the difference between a free-standing and a hosted environment?
What are the advantages of c language?
What is the difference between exit() and _exit() function?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Is flag a keyword in c?
Explain enumerated types.
Explain the use of fflush() function?
How can I make it pause before closing the program output window?
What is actual argument?
What is strcpy() function?
What is the size of enum in bytes?
What does nil mean in c?
What are register variables in c?