Programming in C — Major (End Semester) 2026 question paper
MMMUT Information Technology previous year question paper for Programming in C (BIT-103), semester 1, Major (End Semester) 2026. All 24 questions are listed below, each with a written answer on Nexsus.
Paper details
Subject: Programming in C (BIT-103)
Branch: Information Technology
Semester: 1
Exam: Major (End Semester) 2026
Questions: 24
Questions asked in Programming in C Major (End Semester) 2026
Q1. Attempt any Five parts of the following.
Q1(a). Write a program that takes an integer keyed in from the terminal and extracts and displays each digit of the integer in English. [2 marks]
Q1(b). Write a C program to find the greatest common divisors of two numbers. [2 marks]
Q1(c). Differentiate between while ( ) and do-while ( ) looping statements with suitable examples. [2 marks]
Q1(d). Write down the difference between the associativity and precedence of operators. State the precedence and associativity between relational (<, <=, >, >=) & bitwise ( & , ^ , | ) operators. [2 marks]
Q1(e). Write an algorithm to check whether input number is Niven number or not. A Niven number, also known as a Harshad number, is an integer that is divisible by the sum of its digits. [2 marks]
Q1(f). Differentiate between (state clear purpose): i. Cache & RAM ii. Compiler & linker [2 marks]
Q1(g). Discuss the use of following bit-wise operators with c code: i. ~ ii. >> 2 [2 marks]
Q2. Attempt any Two parts of the following.
Q2(a). How do the following two code segments differ in creation of an array [5 marks]
Q2(b). Given an array of integers......... [5 marks]
Q2(c). Explain any four string manipulation library functions with their syntaxes. Write a C program to check whether a string is palindrome or not. [5 marks]
Q3. Attempt any Two parts of the following.
Q3(a). What is recursion? Write a recursive function which is used to generate Fibonacci series of n terms. [5 marks]
Q3(b). What is function? Differentiate between call by value and call by reference using suitable examples. [5 marks]
Q3(c). Write a function def (n) that checks whether n is a deficient number or not. The function should return 1 (one) if the number is deficient otherwise should return 0 (zero). A deficient number is a positive integer where the sum of its proper divisors (divisors excluding the number itself) is less than the number itself. [5 marks]
Q4. Attempt any Two parts of the following.
Q4(a). How does struct differ from union? Create a structure called “Student” with members name, age, and total marks. Write a C program to input data for n students, display their information, and find the average of total marks. [5 marks]
Q4(b). i. Differentiate between text and binary file creations. What is the significance of r, w, a as file opening modes in fopen() function. ii. What are command line arguments? Write a C program to demonstrate the usage of variables-argc and .argv passed to main function as function parameters. [5 marks]
Q4(c). Write a c program utype that takes file name as input on command prompt and displays its contents.For example, $ utype fname1 will display contents of file named fname1 [5 marks]
Q5. Attempt any Two parts of the following.
Q5(a). Create a list of n integers dynamically using malloc or calloc functions and sort the integers in ascending order [5 marks]
Q5(b). Explain the memory management done by operating system for running a c program with an appropriate example. [5 marks]
Q5(c). What is linked list? Differentiate between single linked list and double linked list. Explain with appropriate examples. [5 marks]