Implement strcmp

Answer Posted / sanjith

#inclde<string.h>
int d;
class test
public: void read()
void cmb()
};
void test::read()
{ cout<<"Enter the first string:";
cin>>s1;
cout<<"Enter the second string";
cin>>s2;
}
void test::cmb()
{
d=strcmp(s1,s2);
}
main()
{
test t1,t2;
t1.read();
t2.cmb();
t2.print();
}

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

program explaining feautures of c++

1908


Which bit wise operator is suitable for checking whether a particular bit is on or off?

597


What is #include iostream h in c++?

598


Describe new operator and delete operator?

618


what are the iterator and generic algorithms.

1451






What are mutator methods in c++?

635


Is java easier than c++?

578


What happens when you make call 'delete this;'?

593


Show the declaration for a static function pointer.

566


Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).

623


Explain about templates of C++.

668


What is stream and its types in c++?

546


Define token in c++.

705


Differentiate between a constructor and a destructor in c++.

554


Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.

1707