Information on the Programming Test
Interested MS and PhD applicants will need to appear for a programming test in the
C language.
Topics for the Programming Test
- Conditionals, if-then, if-then-else, nested conditionals, switch-case
- Loops, for, while, repeat, loop invariants, precondition, postcondition
- Functions and return values, arguments, pass by value, the effect of passing pointers
(like pass by reference)
- Recursion
- Arrays, enums, searching, sorting
- Pointers, lists, dynamic data structures, stack, queue, graphs, trees related
algorithms, memory and its management.
The problems asked may be based on topics involving one or more C programming techniques
mentioned above.
Click here for a sample programming
problem.
Programming Test Infrastructure
Programming tests will be conducted using Prutor, an online programming IDE
developed in-house at IITK.
You will be provided an web-based interface of Prutor for the
programming test. There will be a brief session before the test to help you familiarize with
Prutor. Please refer to the following material to learn more about using Prutor.
Instructions for the Programming Test
-
The programming test will be a open notebook test, i.e., examinees can bring one notebook
containing only handwritten notes. This is just to facilitate that applicants do
not get stuck with the syntax or programming ideas they were taught in school/college.
- Note that use of mobile phones and any printed material is NOT ALLOWED. Students found
in
possession of any such item during the exam will be disqualified.
- The programming test will also be manually graded -- which means human eyes will check
your
program, which is good since you'll get partial scores for programs that may have failed
on many test
cases. At the same time, a human code reviewer won't have much patience if your code is
not nicely
written, indented, or commented. Make sure that you use all the good programming habits to
help the
grader read your program easily.
Few Tips
- Read all instructions and the questions carefully.
- Approaching a problem
-
Don't try to write the entire program in one attempt.
-
Write short segments of code and keep compiling whenever possible.
- Use functions to divide your program into smaller components.
- Write functions to perform ONE task at a time. Combine the tasks in main.
- Debug your program if it is not working
-
Don't panic!
- Insert dummy
printf
statements to test where it is going wrong.
- Unit test input/output of the functions you write.
- Make a variable table (especially when using loops).
- Debug ONE iteration of a loop at a time.
- Important: Coding Style
-
Write comments to explain your code.
-
Give meaningful variable names.
-
Use proper indentation.
-
We will monitor system usage both automatically and manually.
- Please don't cheat. It will make life unpleasant for all concerned.