0% found this document useful (0 votes)
2 views2 pages

GTU PPS All Code Programming PYQs 2019 2024

The document outlines programming and code-based past year questions (PYQs) from GTU for the years 2019-2024, covering a full syllabus. It includes various coding exercises across multiple chapters such as algorithms, C programming basics, control structures, functions, arrays, pointers, structures, file handling, dynamic memory allocation, and debugging. Each chapter provides specific programming tasks aimed at reinforcing coding skills and concepts.

Uploaded by

keyurparmar923
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

GTU PPS All Code Programming PYQs 2019 2024

The document outlines programming and code-based past year questions (PYQs) from GTU for the years 2019-2024, covering a full syllabus. It includes various coding exercises across multiple chapters such as algorithms, C programming basics, control structures, functions, arrays, pointers, structures, file handling, dynamic memory allocation, and debugging. Each chapter provides specific programming tasks aimed at reinforcing coding skills and concepts.

Uploaded by

keyurparmar923
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

GTU PPS (3110003) – All

Programming/Code-Based PYQs (2019–


2024)
✅ Every coding/logic-based question from GTU past papers (no theory) | 🔁 Full syllabus
covered | 📅 2019–2024

Chapter 1: Algorithm and Flowchart


 Write algorithm & flowchart to find maximum of 3 numbers
 Write algorithm & flowchart to check whether a year is leap year
 Flowchart to check whether number is even or odd

Chapter 2: Basics of C Programming


 Write a program to add two numbers
 Write a program to convert temperature from Celsius to Fahrenheit
 Write a program to swap two numbers using third variable
 Write a program to swap two numbers without using third variable
 Write a program to print ASCII value of a character

Chapter 3: Control Structures


 Write a program to find largest of two numbers using if-else
 Write a program to print weekday name using switch-case
 Write a program to check whether a number is even or odd using ternary operator
 Write a program to display multiplication table of a given number
 Write a program to check whether number is positive, negative or zero
 Write a program using nested if-else to determine grade from marks
 Write a program using while loop to find sum of digits of number

Chapter 4: Functions & Recursion


 Write a UDF to check whether number is prime
 Write a function to return square and cube of a number
 Write a menu-driven calculator using user-defined functions
 Write a recursive function to calculate factorial of number
 Write a function that takes parameters and returns the sum
 Program demonstrating call by value and call by reference

Chapter 5: Arrays and Strings


 Write a program to store 10 values in array and find maximum
 Write a program to sort array elements in ascending order
 Write a program for matrix multiplication (3x3)
 Write a program to find sum of diagonal elements in a 2D matrix
 Write a program to input and print string using gets() and puts()
 Write a program to copy one string to another without using strcpy()
 Write a program to concatenate two strings using strcat()
 Write a program to compare two strings using strcmp()
 Write a program to calculate length of string using strlen()

Chapter 6: Pointers
 Write a program to declare pointer and print its address
 Write a program demonstrating pointer arithmetic with array
 Write a program using malloc to store and display array elements
 Write a program to dynamically allocate memory using calloc
 Write a program using malloc and free for 1D array
 Write a program using realloc to resize memory

Chapter 7: Structures and Unions


 Write a program to define structure of employee and display details
 Write a program using array of structure to store marks of 5 students and find total
 Write a program to calculate total salary of 5 employees using structure
 Write a program demonstrating structure within structure
 Write a program using union to store and display student data

Chapter 8: File Handling


 Write a program to open a file and write student records to it
 Write a program to read contents from file and display
 Write a program using fprintf() and fscanf() to write and read employee data
 Write a program to copy content of one file into another

Chapter 9: Dynamic Memory Allocation


 Write a program using malloc and free for dynamic array
 Write a program to allocate memory using calloc and display array elements
 Write a program to resize memory using realloc()
 Write a program to release allocated memory using free()

Chapter 10: Debugging and Testing


 Correct the following buggy code: (e.g., missing semicolon, wrong variable use)
 Write a test case to validate user input is positive integer
 Trace and debug a loop logic that prints wrong output

You might also like