1
2#include<iostream>
3#include<algorithm> // for lexicographical_compare()
4using namespace std;
5
6int main()
7{
8 char one[] = "mynameisomkar";
9 char two[] = "xyz";
10 if( lexicographical_compare(one, one+13, two, two+3))
11 {
12 cout << "mynameisomkar is lexicographically less than xyz";
13 }
14 else
15 {
16 cout << "mynameisomkar is not lexicographically less than xyz";
17 }
18}