lexiographic value of string c 2b 2b

Solutions on MaxInterview for lexiographic value of string c 2b 2b by the best coders in the world

showing results for - "lexiographic value of string c 2b 2b"
Meissa
26 Jan 2019
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}