Jump to content

c++ program by Politicians


Bezawada_Lion

Recommended Posts

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 statement
cin>>: Receives input from the user
strcmp(): Compares 2 strings. Returns 0 if equal, a value > 0 if 1st string’s value greater than 2nd string’s, and a value < 0 otherwise
strrev(): Reverses a string)

 

Rahul Gandhi’s code

Rahul.gif

 

Dr. Manmohan Singh’s code

mms1.gif

 

Deve Gowda’s code

devegowda.gif

 

Narendra Modi’s code

modi.gif

 

Arvind Kejriwal’s code

kejriwal.gif

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...