B.TechSemester 22022-23Programming For Problem SolvingBCS201

Programming For Problem Solving (BCS201) - AKTU Question Paper 2022-23

B.Tech · Semester 2 · Free PDF Download

This is the official AKTU Programming For Problem Solving Previous Year Question Paper for B.Tech Semester 2, academic session 2022-23. Published by Dr. A.P.J. Abdul Kalam Technical University (AKTU/UPTU), Lucknow. Free PDF download — no login required.

Course:B.Tech
Semester:Semester 2
Session:2022-23
University:AKTU / UPTU

Rate this paper

Questions Asked in 2022-23

Programming For Problem Solving (BCS201) — complete question paper

Section AAttempt all questions in brief. 2 x 7 = 14
  • a
    Differentiate between algorithm and program
  • b
    Discuss the functions of an operating system in brief
  • c
    Write the output of following code:
    #include <stdio.h>
    int main()
    {
     int a = -10, b = 20;
      a++;
     else if(a < 0 && b < 0)
      a--;
     else if(a < 0 && b > 0)
      b--;
     else
      b--;
     printf("%d\n",a + b);
     return 0;
    }
  • d
    Compare linear search and binary search in terms of time complexity
  • e
    Differentiate between structure and union
  • f
    What do you mean by pointer arithmetic?
  • g
    Discuss linked list in brief
Section BAttempt any three of the following: 7 x 3 = 21
  • a
    Explain flow chart and benefits of using the flow chart in programming. Draw a flow chart to find the sum and average of n integers
  • b
    Explain recursion in C. Write a program in C to find the factorial of a given number using recursive method
  • c
    Write a program in C to reverse a given number N having any number of digits
  • d
    Discuss the following string functions in C with suitable code snippet: i) strrev ii) strcmp iii) strcat iv) strlen v) strcpy
  • e
    Explain the process of using fopen() function in C with suitable examples. Also discuss various modes of opening a file in C
Section CAttempt any one part of the following: 7 x 1 = 7
  • a
    Discuss various storage classes used in C including the details of storage place, default value, scope and lifetime
  • b
    Discuss various primitive data types used in C with suitable examples including their required memory size, format specifier and range
  • a
    Write a program in C to print grades as per following criteria for obtained percentage of marks M out of 100: Obtained Percent Marks (M) Grade Explain different types of bitwise operators used in C with suitable examples. Find the value of following expressions: i) 10 >>2 ii) 20 << 2 iii) 25 & 30 iv) 25 | 30
  • a
    Differentiate between while and do-while loop. Write a program in C to print the following pattern
  • b
    Explain array in C. Write a program in C to multiply two matrices, each of order NxN and display it on console
  • a
    Explain call by value and call by reference with suitable example
  • b
    Discuss sorting. Write a program in C for selection sorting
  • a
    Explain static memory allocation and dynamic memory allocation with suitable examples
  • b
    Discuss various file handling methods used in C in brief. Write a program in C to write some text matter into a file “example.txt” and then read this text matter and display on console using file handling methods

Question text is extracted from the official AKTU question paper PDF above. Hindi translations are omitted — every question is printed in English in the original paper. Last verified: 2026-08-23.

Repeated Questions — BCS201

Questions that appeared in more than one session, found by comparing 3 years of Programming For Problem Solving papers (2022-23, 2023-24, 2024-25)

2x

Differentiate between algorithm and program

Appeared in: 2022-23 · 2024-25

2x

Differentiate between structure and union

Appeared in: 2022-23 · 2024-25

2x

Explain call by value and call by reference with suitable example

Appeared in: 2022-23 · 2024-25