how to find string length wihtout using c function?
Answer Posted / ramesh
# include <stdio.h>
# include <conio.h>
void main()
{
int i;
char sring[100];
printf("ENTER THE STRING :");
gets(string);
for(i=1;string[i];i++);
printf("LENGTH IS : %d",i);
}
| Is This Answer Correct ? | 0 Yes | 0 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
What is the usage of the pointer in c?
Explain about the functions strcat() and strcmp()?
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
What are the types of assignment statements?
Can we declare function inside main?
How can I write a function that takes a format string and a variable number of arguments?
What is a loop?
Is c weakly typed?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
How do you do dynamic memory allocation in C applications?
What is the purpose of macro in C language?
What is the use of #define preprocessor in c?
what is a function method?give example?
Why can’t constant values be used to define an array’s initial size?