Question Bank BPOPS203

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Question Bank (BPOPS203)

Module 1

1. Explain different generations of Computer.


2. Define an Algorithm. Write an algorithm to find whether a number is Even or Odd.
3. Explain any 2 input and output devices.

4. Explain Input and Output statements and their syntax in the C programming language. Write a
C program to read the radius and print the area of a circle.

5. Write a C program to compute simple interest. Draw the flowchart for the same.

6. Define a variable. Explain how variables are declared with syntax in C Programming
language.

7. Define computer. Describe the various types of computers based on speed, memory and cost.

8. Explain the components of a computer with a neat diagram.

9. Explain the structure of c program in detail. Write a sample program to demonstrate the
components in the structure of C program.

10. Explain (i) Keywords (ii) Identifiers (iii) Constants (iv) Data types.

Module 2

1. Explain Relational and logical operators in detail with example.

2. Identify all conditional control statements used in C. Illustrate the usage of any two of these
statements with appropriate syntax and examples.

3. Explain the different types of loops in C with syntax.

4. Compute the roots of a quadratic equation by accepting the coefficients. Print appropriate
messages.

5. Write a C program that reads from the user an arithmetic operator and two operands. Perform
the corresponding arithmetic operation on the operands using switch statement.
6 Differentiate between Typecasting and Type conversion with example.

7. With an example explain while, do-while and for loop.

8. Develop a C program that takes three coefficients (a, b, and c) of a quadratic equation; (ax2 + bx +
c) as input and compute all possible roots and print them with appropriate messages.

9. Develop a simple calculator program in C language to do simple operations like addition,


subtraction, multiplication and division using switch statement.

10 . ) Write a C Program to display the following by reading the number of rows as input,
1
121
12321
1234321
--------------------------- n th row

11. With an example explain else if ladder and nested if-else statement.

12. Explain the working of goto statement in C programming with suitable example.

13. Explain the working of continue statement in C programming with suitable example

Module 3

1. Examine the concept of functions in C programming. Illustrate the syntax for function
declaration, function call, and function definition with an example.

2.Analyze the concept of arrays in C programming. Demonstrate with a detailed example how to
declare and initialize a one-dimensional array.

3. Analyze the different storage classes supported in C programming. Provide a detailed


explanation of each storage class along with their syntax.

4 Differentiate between call by value and call by reference with examples.

5. What are the different operations that can be performed on arrays? Describe how to perform
each of these operations.

6. Analyze the concept of recursion in C programming. Develop a C program that uses a


recursive function to generate the Fibonacci series.

7. What is recursion? Write a C program to compute factorial using recursion.


8. Explain the C user-defined functions with a suitable example

9. Explain scope of variables and Storage classes.

10. (i) Difference between call by value and call by reference.


(ii) Explain return statement with example.

11. Explain the function parameters to function.

12. Write a C Program to calculate the sum of first N natural numbers using recursion.

13. (i) Difference between call by value and call by reference.


(ii) Difference between Local variable and call by Global variable

14. Write a C program to implement Bubble sort technique (ascending order) and trace the
program for the following input: 58 42 10 25 60.

15. Define Array. How 1Dimension integer array is represented in memory? with the help of
suitable example demonstrate the initializing the array elements

Module 4

1. Define String and explain how String is declared in C. Discuss different ways of reading and
writing a string.

2. Explain the following operations using appropriate code snippets in C:


a. String Length
b. String Copy
c. String Concatenation
d. String Compare.

3. Define Pointer. Show how pointer variables declared and initialized with example.

4. Show the memory representation of array of strings and explain the following with respect to
array of strings:
a. Array of String Declaration
b. Array of String Initialization.

5. List any 4 String handling functions in C and explain them with example for each.

6. Explain the following with example for each:


a. NULL Pointers
b. Using pointers as function arguments.

7. Write the result of the following C code:


int num1=10, num2=20;
int *p=&num1, *q=&num2;
*p=*q;
printf(“%d %d”,*p,*q);

8. What is a pointer? Discuss the types of Pointers with suitable C code.

9. Write functions to implement string operations such as compare, concatenate, and find string
length.

10. What is String? Explain the declaration and initialization of a string with example.

11. Develop a program using pointers to compute the sum, mean and standard deviation of all elements
stored in an array of N real numbers.
12. Write a C code for the following. (i) Extracting a Substring from Left (ii)Reversing a string

13. Explain string taxonomy.

14. Write a C program to swap two integer values using pointers

15. How 2D array is represented in memory? Explain with a suitable example


OR
16. With the help of suitable example explain the working of Binary Search technique.
17. Mention various operations that can be performed on strings using built-in functions.
Explain any two functions with suitable code.

18. Explain passing arguments to functions using pointers with example.

19. List the operations of a string. Explain any two operations with suitable example

Module 5
1.Show how Structure is declared and discuss the importance of typedef with respect to
structures.

2. Explain the following with respect to structures with example for each:
a. Structure variable declaration
b. Structure variable initialization
c. Accessing members of structures

3. Develop a program to Implement structures to read, write and compute average- marks of the
students, list the students scoring above and below the average marks for a class of N students.

4 . Discuss the following with respect to passing structures to functions as arguments:


a. Passing Individual Members
b. Passing Entire Structure
c. Passing address of the Structure

5. Explain the following:


a. Nested Structures and Nested Unions
b. Array of Structures.

6. Define a structure by name DoB consisting of three variable members dd, mm and yy of type integer.
Develop a C program that would read values to the individual member and display the date in mm/dd/yy
form.

7. How structure in C is different from union? Give example.


8. What is enumeration data type? How are they declared? What are the advantages of using
them in a program?

9. Explain detecting the end of file.

10. Explain with example (i) fgetc (ii) fscanf

11. Write a C program to swap two integers without using temporary variable

12. What is Nested structure? Explain with example.

13. Explain structures inside union with example.


14 a) Explain with example (i) fputs (ii) fwrite

Important note: Along with these questions you should study question bank of all the 3 internals and
all the 12 lab programs without fail.

You might also like