0% found this document useful (0 votes)
34 views14 pages

Question Bank PPS Updated

Uploaded by

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

Question Bank PPS Updated

Uploaded by

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

Unit - I

Introduction to Problem Solving and Programming Concepts

SR. No. Question BTL

BTL2
1. Explain the difference between primary and secondary
memory

BTL3
2. Construct an algorithm to calculate the factorial of a
number.

BTL3
3. Develop flowchart to determine if the user entered
number is an Armstrong number or not.

4. Explain the key characteristics of the each generation of BTL2


computers

5. What is the role of the CPU in a computer's BTL1


architecture?

6. List and explain steps present in the problem-solving BTL2


process?

BTL3
7. Construct an algorithm and pseudocode to swap two
values without using a third variable.
BTL3
8. Develop flowchart to determine if the user entered
number is an Armstrong number or not.

BTL3
9. Develop flowchart to find number is even or odd.

BTL3
10. Develop algorithm and pseudocode to calculate area
and perimeter of rectangle.

11. Compare between System Software and application BTL2


software

12. Develop flowchart to calculate average of the first N BTL3


natural numbers.

13. Compare Machine Level Language and High Level BTL2


Language.

14. What are the steps involved in executing a program? BTL1

15. What is a logic error, and why is it often difficult to BTL1


detect?

16. What are the main components of a C program? BTL1

17. Explain the significance of assembler, interpreter and BTL2


compiler.
18. Develop algorithm and flowchart to calculate simple BTL3
interest and compound interest.
UNIT-II : Programming Basics and Control Structures

Q. No. Questions BTL

What are Looping statements? Explain any two with syntax BTL2
1. and example.

2. Construct a C program to find the biggest of three numbers. BTL3

3. Explain switch statement with syntax and example. BTL2

4. Explain with syntax the different loops used in C program. BTL2

Develop a program in C to find the sum of n natural numbers. BTL3


5.

6. Develop a C program to find GCD of two numbers. BTL3

Develop a C program to determine if the user entered number is a BTL3


7. prime number or not.

What are looping statements in C programming? Explain any BTL2


8. two with syntax and examples.

Distinguish between break and continue statements with an BTL4


9. example

Develop a calculator program in C language to do simple BTL4


operations like addition, subtraction, multiplication and
10. division. Use switch statement in your program.
Develop a program to check whether the person is eligible to BTL4
11. vote.

12. Define goto with an example. BTL1

13. Define exit and return statements. BTL1

14. Construct a program to generate prime numbers between 1 and BTL3


n

15. Construct a program to find the sum of the individual digits of BTL3
a given number.

16. Construct a program to find the sum of even and odd numbers BTL3
from 1 to n.

17. What is a nested loop? Construct a program to display BTL3


multiplications tables from 1 to n.

18. Construct a program to display the following pattern. BTL3

*****
****
***
**
*
Unit - III

Array and Strings

SR. No. Question BTL

1. Explain the syntax for declaring a one-dimensional BTL2


array in C.

2. How do you declare a two-dimensional array? Provide BTL1


an example.

3. How can you loop through all elements of a one- BTL1


dimensional array? Provide example.

4. Explain how to access elements in a two-dimensional BTL2


array using indices.

5. Construct a program that finds the maximum element in BTL3


a one-dimensional array.

6. How can you reverse the elements of a one-dimensional BTL1


array in place?

7. What is a two-dimensional array? Give an example. BTL1


8. How does the strlen() function work? Provide an BTL1
example.

9. Develop a program to count the number of vowels in a BTL3


given string using arrays.

10. Develop a program that reverse the elements of a one- BTL3


dimensional array.

11. What is an array? How is it different from a BTL1


variable?Explain with an example.

12. Construct a C program that finds the largest element in BTL3


a one-dimensional array.

13. Develop a program that uses strcat() to concatenate two BTL3


strings.

14. Explain with a suitable example, how to access BTL1


elements in a two-dimensional array using indices.

15. Distinguish between one-dimensional array and two- BTL3


dimensional array with a suitable example.

16. Construct a program that finds the smallest element in a BTL3


one-dimensional array.
Unit - IV

Functions and Pointers

SR. No. Question BTL

1. Explain the scope of a variable in a function? Explain BTL2


local and global scope.

2. What is meant by the order of passing arguments in a BTL1


function call?

3. What is the purpose of the return statement in C? Write BTL1


a simple program to demonstrate its use.

4. Distinguish between call by reference and call by value BTL3


with suitable example.

5. Build a function is_leap_year which takes the year as its BTL3


argument, checks whether the year is a leap year or not,
and then displays appropriate message on the screen.

Define pointers, explain the difference between a null


6. pointer and a void pointer. BTL1

Develop a program to calculate the factorial of a number


7. using the user defined function “fact”. BTL3
Analyze how a program behaves when the number of
8. actual parameters is less than the formal parameters in a BTL3
function. Identify possible errors or outcomes, explain
with an example.

9. Why are functions needed in C? Explain the concept of BTL3


a function, its syntax, and provide a suitable example.

10. Distinguish between Library functions and User defined BTL1


functions in C programming and explain with
examples.

11. Build a program that uses functions to calculate the BTL3


area and circumference of a circle. The radius should be
passed as a parameter.

12. Explain recursion with a suitable example. BTL2

13. Explain how to use functions like malloc, calloc, and BTL2
free in C for dynamic memory management.

14. Develop C program for recursive function to calculate BTL3


the factorial of a number.

15. What are pointer expressions? How can they be used in BTL1
arithmetic operations?

16. Develop C program to calculate the average of first n BTL3


numbers using function.
17. What are advantages and disadvantages of call by BTL1
reference technique?

18. Develop C program to check year is leap year or not BTL3


using function.
UNIT- V : Structures and Unions

Q. No. Questions BTL

1. What are the storage classes available in C? BTL1

2. Define Macro in C. BTL1

3. Define Union in C , Explain how members of a union are BTL1


accessed using a program code?

Develop a structure named "Car" to store details like car ID, BTL3
4. model, and cost. Write a C program to input data for three cars,
and display the information.

5. Distinguish between a structure and an array with suitable BTL4


example.
Explain the concept of nested structures with an example.
6. BTL1

Develop a structure named Book to store book details like title,


author, and price. Write a C program to input details for three BTL3
7. books, find the most expensive and the lowest priced books, and
display their information.
Distinguish between structure and union, Explain in which
8. applications union can be useful? BTL4

What do you mean by structure definition? Define BTL3


Structure “Employee” to store Employee name,
9. Designation, Date of Joining, Salary.

Develop a C program to define a structure to store the BTL4


information of 5 students, including their name, roll
number, and marks. Use an array of structures and print
10. the details of all students
11. Distinguish between structure and union with suitable example. BTL1

What is a structure? Create a structure with data members BTL1


12. of various types and declare two structure variables.

Construct a program to read data into these and print the BTL3
13. same. Justify the need for structured data type.

Define a structure named Time with members hours, BTL3


minutes, and seconds. Construct a C program to input two
times, add them, and display the result in proper time
14. format.

15. Define a structure named "Date" with members day, BTL3


month, and year. Write a C program to input two dates
and find the difference in days between them.
Unit - VI

File Operations

SR. No. Question BTL

1. What function would you use to read an entire line from BTL1
a file in C?

Explain the difference between fgets( ) and gets( ) with


2. suitable example. BTL1

Develop a program to read and display the contents of a BTL3


3. text file.

Develop a program to count characters, tabs and spaces BTL3


4. in a text file

Explain the purpose of each mode used for opening a BTL1


5. file?

Compare different standard library functions for reading BTL3


6. data from a file with suitable example.

Build a C program to append the contents of “try1.txt” at BTL4


7. the end of another file “try2.txt”.

BTL1
8. Explain the syntax for opening a file in C with a
suitable example. What parameters does it require?

BTL3
9. Develop a program that counts the number of characters
in a file.
BTL4
10. Distinguish between reading characters and reading
strings from a file.

11. What are some common reasons for failure when BTL1
attempting to open a file?

12. How can you handle errors when a file fails to open? BTL1
Provide a code snippet demonstrating this.

13. What is the importance of checking if a file opened BTL1


successfully?

14. Why is it important to close a file after operations are BTL1


complete?

15. What function is used to close a file in C? What does it BTL1


return?

16. What is the effect of opening a file in "append" mode BTL1


versus "write" mode?

17. How do you write a string to a file? Give a code BTL1


example.

18. Explain some real-life applications where file handling BTL2


is essential.

You might also like