Skip to content

Instantly share code, notes, and snippets.

@chandresh
Created June 29, 2013 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chandresh/5891533 to your computer and use it in GitHub Desktop.
Save chandresh/5891533 to your computer and use it in GitHub Desktop.
exercise
1.Create a data structure: student like this with correct syntax:
First Name: “John”
Last Name: “Doe”
Age: 15
Subjects: “Physics”,”Chemistry”,”Maths”
Marks: Physics: 75, Maths: 85, Chemistry:
Create a program to display the information similar to above format
2. Given that you have many strings, write a program to print the 3 longest strings. You can get the strings from the user or start with an array of strings.
Part 2: Ensure that the lines are printed out in decreasing order of length i.e. the output should be sorted based on their length.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment