FPL Question bank

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Dr. D. Y.

Patil Unitech Society


Dr. D. Y. Patil Institute of Technology, Pimpri, Pune – 18
Department of First Year Engineering
Semester –I AY: 2024-25
SUB: fundamentals of Programming Language

Questions
Unit-1
1 Explain the importance of program design tools like algorithms and flowcharts..
2 What are C tokens? List and explain different types of C tokens with examples..
3 Write an algorithm and draw a flowchart to calculate the factorial of a number.
4 What are keywords and identifiers?
5 Write an algorithm and draw a flowchart to swap two numbers.
6 Discuss the history and importance of the C programming language
7 What is the difference between const and volatile variables in C?
8 Write an algorithm and draw a flowchart to swap two numbers.
9 What are datatypes in C?
10 Write an algorithm and draw a flowchart to check number is even or odd.

Unit-2
1 What are arithmetic operators? Explain with examples.
2 What is operator precedence and associativity in C? Explain with an example involving
multiple operators.
3 Write a program to perform addition, subtraction, multiplication & division of two
numbers.
4 What is the conditional operator?
5 Differentiate prefix and postfix operators with example
6 What are the different types of operators in C? Explain each type with examples.
7 Define relational operators and provide examples of their usage.

Unit-3
1 Explain the use of if, else-if, else-if ladder, switch statements in C with examples
2 What is the purpose of break statement in C? Explain with examples.
3 Write a program using a switch statement to find the day of the week based on an
integer input.
4 What are loops in C? Explain while and for loops with examples.
5 What is the purpose of continue statements in C? Explain with examples.
6 Write a program to print the multiplication table of a given number using a for loop.
7 Write a program using a switch statement to perform calculator operations (+,-,*,/)
based on an integer input.
8 Write a program to print the factorial of a number.

Unit-4
1 Explain the declaration and initialization of one-dimensional arrays in C with
examples.
2 How are strings handled in C? Explain how to declare and initialize strings.
3 Write a program to find the largest element in an array of integers.
4 Write a short note on Comparison of two string.
5 Define a two-dimensional array in C. how to initialize two-dimensional array?
6 How to read strings from terminal?
7 Write a program to compare two strings using strcmp()and concatenate using strcat()

Unit-5
1 What is the need for user-defined functions in C? Explain with an example.
2 Explain the different categories of functions in C with examples:

1. No Arguments, No Return Value


2. Arguments, No Return Value
3. Arguments with Return Value
4. No Arguments but Return a Value

3 Write a program to store information about a student (name, roll number, and marks)
using structures and display it.
4 Explain nesting of function using example.
5 Define a structure in C. how to declare & initialize it?
6 What is recursion? Write a recursive function to calculate the factorial of a number.
7 Define a structure in C. how to declare & initialize it?

You might also like