Answer Posted / bin
Here is a subroutine that does strcpy, returns 0 if both are equal, returns a positive number, if arg1 is higher else returns a negative number
int mystrcmp(char *s1, char *s2)
{
while (*s1 != 0 && *s2 != 0 && *s1 == *s2) {
++s1; ++s2;
}
return (*s1) - (*s2);
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is union and structure in c?
Explain the process of converting a Tree into a Binary Tree.
How to write a multi-statement macro?
Tell me the use of bit field in c language?
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
Which programming language is best for getting job 2020?
Can static variables be declared in a header file?
Dont ansi function prototypes render lint obsolete?
Why can't I perform arithmetic on a void* pointer?
What is the usage of the pointer in c?
What is cohesion in c?
Differentiate call by value and call by reference?
What is the difference between procedural and functional programming?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
Explain the bubble sort algorithm.