0% found this document useful (0 votes)
76 views4 pages

Question Bank CSF101-PPS

This document contains a question bank with questions related to programming for problem solving. It is divided into 5 units covering topics such as identifiers, keywords, data types, operators, control structures, arrays, strings, functions, structures, pointers, file handling and more. Each unit contains 10 questions testing understanding of concepts and asking to write programs demonstrating those concepts. The questions range from simple definitions and explanations to more complex programs involving multiple concepts.

Uploaded by

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

Question Bank CSF101-PPS

This document contains a question bank with questions related to programming for problem solving. It is divided into 5 units covering topics such as identifiers, keywords, data types, operators, control structures, arrays, strings, functions, structures, pointers, file handling and more. Each unit contains 10 questions testing understanding of concepts and asking to write programs demonstrating those concepts. The questions range from simple definitions and explanations to more complex programs involving multiple concepts.

Uploaded by

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

PROGRAMMING FOR PROBLEM SOLVING (CSF101)

QUESTION BANK

UNIT-1
Q1. Differentiate between the identifiers and keywords with example. Discuss the rules of identifier
for naming any entities.
Q2. Explain the concept of flow diagram, how a C program code is executed in a programming
environment by explaining the difference between source code, object code and executable code.
Q3. Differentiate between algorithm and flowchart. Write an algorithm and draw flowchart to print
the largest number among three integers.
Q4. Evaluate the binary, octal and hexadecimal equivalent of the decimal number (544.514) 10.
Q5. Define block diagram of Computer System.
Q6. Differentiate between software and hardware. Also explain application software in detail.
Q7. Distinguish among compiler, interpreter and assembler.
Q8. Define primary and secondary data type with proper example.
Q9. Explain different types of programming error with suitable examples.
Q10. Write a C program to print the ASCII value of a character.

UNIT-2
Q1. Explain different types of operator in detail with proper example.
Q2. What is the significance of pre-processor directive in a C program? Explain with an example.
Q3. What are bitwise operators? Differentiate between shift left and shift right bitwise operator with
example.
Q4. Evaluate the appropriate output of the following code:
#include<stdio.h>
int main ()
{
int i=3, j=4, k=5, l;
l=i-- + j++ + k--;
printf ("i=%d\nj=%d\nk=%d\nl=%d”, i, j, k, l);
return 0;
}
Q5. Explain the concept of Type Conversion in C. Write a ‘C’ program to demonstrate the use of
both implicit and explicit type conversion.
Q6. Explain the concept of conditional operators in C. Write a ‘C’ program to find out largest between
two numbers using conditional operator.
Q7. Differentiate between while and do- while loops with example. Write a ‘C’ program check
number is Armstrong or not.
Q8. Write a program in C to compute the area of the various geometrical shape as per the following
menu using switch-case:
1. Square
2. Triangle
3. Rectangle
Q9. Write down the objective of for loop in a C program. Write syntax of for loop. Write a program to
calculate the factorial of a given number.

Q10. Write the C programs to print following patterns using ‘for’ loop:
(i) (ii) (iii) (iv)
* 1
********** ** 12 1
********** *** 123 121
********** **** 1234 12321
********** ***** 12345 1234321
********** 123454321

Q11. Explain relational operator with suitable example.


Q12. Define if..else, ladder if and nested if..else statement with proper example.
Q13. Differentiate between break and continue keywords with suitable example.
Q14. Define various types of loops in detail with example.

UNIT-3
Q1. Define the concept of array with syntax. Also explain 1D and 2D array with an example.
Q2. How to declare, initialize and accessing an array in any program? Explain it.
Q3. WAP to print the sum of an array's second and second-last element.
Q4. WAP to count number of positive, negative and zero elements from 3 X 3 matrix.
Q5. Define string. Also illustrate string handling function with their syntax and proper example.
Q6. Define the concept of function in detail. Also define the categories of function with suitable
example (Create a function to swap the values of two variables).
Q7. Differentiate between actual parameter and formal parameter.
Q8. WAP to calculate factorial of a number using function (All the four categories).
Q9. Define the term searching (Linear/ Sequential and Binary Search) with example.
Q10. Define an algorithm for binary search. WAP to search an element from a given array using
binary search.
Q11. Define the term sorting in detail with proper example.
Q12. Define an algorithm for bubble sort. WAP to sort an array in ascending order using bubble sort.
Q13. WAP to sort an array in ascending order.

UNIT-4
Q1. Explain the concept of recursion with their properties. And also define the working of recursive
function.
Q2. WAP to calculate the factorial of a given number using recursion.
Q3. WAP to print the sequence of Fibonacci series using recursion.
Q4. Explain the syntax to define structure and declaration of structure variable.
Q5. How to access the structure member while defining the structure and declaring the structure
variable?
Q6. WAP to read and print the information of N employees using array of structure.
Q7. WAP to define a structure person that would contain the person's name, date of joining, and
salary using this structure to read this information of 5 people and print the same on screen.
Q8. Write a program to declare time structure and read two different time period and display sum of it
using function.

UNIT-5
Q1. How to declare and initialize a pointer variable? Explain in detail.
Q2. Define normal variable, pointer and double pointer by providing a suitable example.
Q3. Write a program to print variable, address of pointer variable and pointer to pointer variable.
Q4. What is the relation between array and pointer? Explain in detail.
Q5. Define the syntax of Array of Pointer.
Q6. Define the following approaches to passing argument to a function:
i. Call by value
ii. Call by reference/address
Q7. Write a program to swap value of two variables using call by value and call by reference
approaches.
Q8. WAP to multiplication of two numbers using pointer to function.
Q9. Define file handling function with their syntax.
Q10. WAP in C to display the content of a given file and copy a given file.

You might also like