Coding
JNTUH R22 lab programs: a practice plan for CSE
JNTUH R22 lab programs across 11 CSE lab courses: practice plans, memory-worthy programs and edge-case testing in GroutCode's offline compiler-checked labs.
Anish Menon · CEO & Founder, Grout
· 8 min read

JNTUH R22 lab programs span eleven lab courses across four years, from C and Python in first year to compiler design and cryptography in fourth. GroutCode covers eleven JNTUH R22 lab courses with 31 compiler-checked lessons in C, Python, Java and SQL, each built around the problem statements in the scheme.
This article sets out a practice plan for each lab, which programs are worth learning to write from memory, and how to test edge cases before the external viva. Check your own college's lab list first: some affiliated colleges shuffle topics or combine courses differently, even under the same scheme year.
First year labs: CS108ES and CS206ES
CS108ES Programming for Problem Solving Laboratory starts with C: control flow, arrays, pointers, structures, file handling. The practical requires a Linux environment and GCC. GroutCode expects you to have a compiler installed and reports what is missing if you try to run a lesson without one.
Practice writing from scratch: a function to reverse an array in place, pointer swaps without a temporary variable, reading and writing a structure to a binary file. These come up in externals because they test fundamentals. Use the starter file for each lesson, fill in the TODOs, then run the tests. Each step fails on the untouched starter and only passes once you have written working code. The AI reviews after the tests pass, it does not write the solution for you.
CS206ES Python Programming Laboratory covers data types, control structures, functions, file I/O, exceptions, NumPy and pandas basics. The external often asks for a small data manipulation task or a function that filters a list. Write a few programs that read a CSV, apply a condition and write the result. Test with empty files, single rows and malformed data before the viva.
Second year first semester: CS306PC and CS307PC
CS306PC Data Structures Lab implements stacks, queues, linked lists, trees and graphs in C. The external viva will ask you to implement a structure and explain the time complexity. Practice writing a singly linked list insert and delete without looking at notes. Write a stack using an array, then using a linked list. Implement inorder traversal on a binary search tree. Test each with an empty structure, a single element and a full structure at capacity.
CS307PC Object Oriented Programming through Java Lab covers classes, inheritance, interfaces, exception handling, threads and collections. The external often asks for a small inheritance hierarchy or a thread synchronisation problem. Write a class with private fields and public getters, then extend it. Write a program that spawns two threads and synchronises access to a shared counter. Test thread code by running it many times: race conditions do not always show up on the first attempt.
Second year second semester: CS406PC and CS407PC
CS406PC Operating Systems Lab uses shell scripts and C programs to demonstrate scheduling, synchronisation and memory management. The external may ask you to write a shell script that processes files or a C program that simulates a scheduling algorithm. Practice writing a Bash script that counts lines in files matching a pattern. Write producer-consumer in C with semaphores. Test the semaphore code with many producers and consumers to find deadlocks before the viva.
CS407PC Database Management Systems Lab uses SQL to create schemas, insert data, write queries with joins and aggregates, and define triggers and procedures. The external will give you a scenario and ask for a query. Practice writing a join across three tables from memory. Write a query that uses GROUP BY and HAVING. Write a trigger that enforces a constraint. Test with empty tables, single rows and edge cases like null foreign keys.

Third year first semester: CS504PC
CS504PC Computer Networks Lab simulates protocols and topologies, often using C or Python. The external may ask you to explain a simulation or modify it. Practice writing a simple client and server in C using sockets. Write a Python script that calculates CRC for a data frame. Test the socket code by connecting from another terminal. Test the CRC script with single-bit errors and burst errors to confirm detection.
Some colleges run a web technologies lab instead of or alongside networks. If your college does, check the lab manual for the actual list of programs and frameworks required.
Third year second semester: CS604PC and CS605PC
CS604PC Machine Learning Lab uses Python, scikit-learn and pandas to implement classification, regression and clustering. The external asks you to explain an algorithm and show results. Practice writing a k-nearest neighbours classifier from scratch, then using scikit-learn. Write linear regression with gradient descent. Test with synthetic data where you know the correct answer, then with real data that has missing values and outliers.
CS605PC Artificial Intelligence Lab covers search algorithms, constraint satisfaction and simple agents, usually in Python. Practice writing breadth-first search and A* from memory. Write a function that solves the N-queens problem with backtracking. Test search with graphs that have no solution and graphs with multiple paths to the goal.
Fourth year first semester: CS703PC and CS704PC
CS703PC Cryptography and Network Security Lab implements ciphers and hashing in C, Python or Java. The external will ask you to demonstrate an algorithm and explain its security. Practice writing Caesar cipher, Vigenère and RSA key generation from first principles. Write a program that computes SHA-256 for a file. Test ciphers with empty strings, single characters and long messages. Test hashing with files of different sizes.
CS704PC Compiler Design Lab builds a lexical analyser, parser and intermediate code generator, usually in C or Python with lex and yacc. The external may ask you to modify a grammar or add a production. Practice writing a lex file that tokenises a simple expression language. Write a yacc file that parses those tokens. Test with valid input, then with syntax errors and edge cases like nested parentheses.

A practice routine that works
Start each lab six weeks before the external. Work through the practicals in GroutCode one lesson at a time, reading the problem statement, writing the code in the starter file and running the tests until all steps pass. The tests catch logic errors and edge cases before you submit.
After the tests pass, the AI reviews your code and suggests improvements. It does not write the solution for you, so you learn by doing. Once you finish all lessons in a lab, pick three to five programs and rewrite them from memory without the starter file. Time yourself: you should finish a stack implementation or a SQL join in fifteen minutes.
Test edge cases explicitly. For data structures, test empty, single-element and full. For file I/O, test missing files and malformed data. For concurrency, run the program many times. For algorithms, test with no solution and multiple solutions. The external viva will ask what happens in these cases.
GroutCode includes a coding agent that helps when you are stuck, but it will not write the program for you. Use it to understand an error message or clarify a concept, not to bypass the learning. The goal is to reach the external able to write the core programs from memory and explain every line.
What the external viva tests
The external viva at JNTUH asks you to run a program from your record, explain the code and modify it. The examiner may ask you to add error handling, change a data structure or explain the time complexity. If you wrote the programs yourself during the semester, you can answer these questions. If you copied code you do not understand, the viva will expose that quickly.
Some externals ask you to write a small program on paper or on the board. Practice writing code without an IDE: no autocomplete, no syntax highlighting, no compiler to catch typos. Write a linked list insert on paper, then type it and compile it to check for mistakes. Repeat until you write it correctly on paper the first time.
The viva also tests conceptual understanding. For data structures, know the time complexity of insert, delete and search. For operating systems, explain the difference between semaphore and mutex. For machine learning, explain bias and variance. The lab manual and your college's recommended textbook cover these topics.
A note on institution exam features
Schools and colleges on institution plans can set, assign and grade coding exams inside GroutCode, with each student's code tested by a real compiler on their own machine. These exams are an institution-only feature and are not part of individual student subscriptions. If your college uses GroutCode for lab exams, follow the instructions your faculty provides.
Individual practice remains the same whether or not your college uses institution features: work through the lessons, write the code, pass the tests, then rewrite the core programs from memory. The external viva rewards students who can write and explain code without assistance, and that skill comes from repeated practice on real problems with a real compiler.