Ajay Kumar Garg Engineering College, Ghaziabad
Department of IT/CSE
Question Bank for STT
Course: B.Tech Semester: I
Session: 2024-25 Section: S-1 to S-10
Subject: Programming for Problem Solving Sub. Code: BCS-101
UNIT-1
2 marks:
1. What is an Algorithm? Write its Properties.
2. Differentiate between Algorithm and Flowchart.
3. Draw the memory hierarchical structure of the computer system.
4. Describe Structured Programming in brief.
5. What do you understand by range of any data type? Explain with suitable examples.
6. What do you understand by storage devices?
7 marks:
1. What is a digital Computer? Draw its block diagram. Discuss all its components.
2. What are the various primary data types in c language? Also, write the size and format
specifier of each data type in tabular format.
3. Write an algorithm and draw a flowchart to find the sum of all the numbers divisible by 3
between 11 and 50.
4. Write an algorithm that swaps two numbers using three variables.
5. What is an operating system? Why is it called a resource manager? Describe each OS
management function in detail.
6. Draw a flowchart that finds the greatest number among three numbers. Write a program
in C that takes input as five subjects from the user and prints average and percentage.
UNIT-2
2 marks:
1. Explain mixed operands?
2. Explain sizeof Operator in C language.
3. Differentiate between implicit and explicit type casting with examples.
4. If int a=3,b=5,x=0; find the value of x=(++a, b+=a--, b++);
5. Show the usage of break statement.
7 Marks:
1. Explain operator precedence and associativity. Resolve the expression stepwise to obtain
the final value of x. (Show all intermediate steps)
int x=(-10*(2-3)/15%(5+7)+8*6/12)
2. Explain how and when comma operator acts as separator as well as operator. Write a c
program to elaborate the use of type casting and type conversion.
3. Explain any three operator types used in C.
4. Explain the if-else ladder. Write a program that accepts marks of five subjects and finds
percentage and prints grades according to the following criteria:
Between 90-100%-----Print ‘A’
80-90%-----------------Print ‘B’
60-80%-----------------Print ‘C’
Below 60%-------------Print ‘D’
5. Differentiate between switch and if-else statement. What are the limitations of switch
statements? Write a C program using a switch statement to find if a given number is
positive, negative or zero.
6. What is the role of the SWITCH statement in C Programming Language? Write all the
components of SWITCH. WAP that takes two operands and one operator from the user,
performs the basic arithmetic operation, and prints the result by using Switch statement.
UNIT-3
2 Marks:
1. Write a C program to find the factorial of a number using a do-while loop.
2. Explain the difference between structure and Array.
3. What is the enumerated data type? Explain it with a proper example.
4. Differentiate between while and do-while loop with example.
5. Write a program to print the pattern
*
**
***
****
***
**
*
6. Explain the declaration and initialization of a 2D array with an example.
7. Write a Program to print the multiplication of two-dimensional matrices with m*n
dimensions.
7 Marks:
1. What is a character array? WAP in C to check whether a given string is palindrome or
not?
2. Write a program to check if the number is palindrome or not. The program should accept
any arbitrary number typed by the user.
3. Draw the given pattern using any loop
+ + + + + + +
+ + + + +
+ + +
+
4. Explain break, continue and goto statement with example.
5. Write a program to find whether a given number is palindrome or not.
6. Explain how strings are used in C? Discuss any three string manipulation functions with
examples.
7. Define array and type of array. Write a C program to find the transpose of a 3X4 array.
8. Define Structure with syntax. Differentiate between Union and Structure. Write a
program to create a structure Employee with members like EmpID, Name, Designation
and salary. Read records of 50 employees and display the names of employees who are
managers.