What is the o/p of the follow pgm?
#include<stdio.h>
main()
{
char char_arr[5]=”ORACL”;
char c=’E’;
prinf(“%s\n”,strcat(char_arr,c));
}
a:oracle
b. oracl
c.e
d.none
Answer Posted / kalyan chukka
None
| Is This Answer Correct ? | 2 Yes | 3 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
Why is a semicolon (;) put at the end of every program statement?
Write a program to swap two numbers without using third variable?
When should I declare a function?
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
What is c language in simple words?
What are lookup tables in c?
What are derived data types in c?
Why can’t constant values be used to define an array’s initial size?
Why #include is used in c language?
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
What is the purpose of 'register' keyword?
Is file a keyword in c?
Explain how can you restore a redirected standard stream?
What would be an example of a structure analogous to structure c?