Bezawada_Lion Posted February 4, 2014 Share Posted February 4, 2014 Taking time off from a hectic, high-octane election campaign, Indian politicians cooled their heels at tech parks in the IT City of Bangalore and took the opportunity to enhance their technical skills by writing C++ programs. One such program that our netas tried was to compare 2 strings. How did their code look like? (Disclaimer: Techies would appreciate this the best, but for those non-techie readers who are willing to read, here’s a quick explanation of some commands cout<<: Prints a statementcin>>: Receives input from the userstrcmp(): Compares 2 strings. Returns 0 if equal, a value > 0 if 1st string’s value greater than 2nd string’s, and a value < 0 otherwisestrrev(): Reverses a string) Rahul Gandhi’s code Dr. Manmohan Singh’s code Deve Gowda’s code Narendra Modi’s code Arvind Kejriwal’s code Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.