0% found this document useful (0 votes)
8 views3 pages

QB Module 3

This document is a question bank for a Module 3 course in Computer Science and Engineering, focusing on C programming. It includes a variety of questions related to arrays, strings, matrix operations, and functions, along with their corresponding marks, Bloom's taxonomy levels, and course outcomes. The questions range from defining concepts to writing programs for specific tasks, emphasizing practical programming skills.

Uploaded by

w53214929
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)
8 views3 pages

QB Module 3

This document is a question bank for a Module 3 course in Computer Science and Engineering, focusing on C programming. It includes a variety of questions related to arrays, strings, matrix operations, and functions, along with their corresponding marks, Bloom's taxonomy levels, and course outcomes. The questions range from defining concepts to writing programs for specific tasks, emphasizing practical programming skills.

Uploaded by

w53214929
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

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Module 3 - Question Bank

Sl. Questions Marks Blooms COs


No Taxonomy
.
1. Define an array in C. Give the general form of declaration 2 1 3
for a one-dimensional integer array of size 50.
2. Explain how the elements of a one-dimensional array are 4 2 3
accessed in C. Illustrate with an example declaration and
accessing the 5th element.
3. Write a C program to find the product of two given 8 3 3
matrix.
4. Explain the declaration and initialization of one 6 2 3
dimensional and two dimensional arrays with examples
5. Develop a C program to concatenate 2 strings without 6 3 3
using built-in function
6. Define String. Explain any 4 string manipulation function 4 2 3
with suitable example
7 Mention various operations that can be performed on 8 2 3
string using built-in functions. Explain any two function
8. Develop a program using pointer to compute the sum, 8 3 3
mean and standard deviation of all element stored in array
of N real number
9. Develop a program using pointer to compute the sum, 4 2 3
mean and standard L4 8 22POP13 Page 02 of 02
deviation of all element stored in array of N real number
10. Define an array. Explain with suitable example how to 4 2 3
declare and initialize an 1D array.
11. Write a C program to read N integers into an array A and 6 3 3
to find (i) sum of odd numbers, (ii) sum of even numbers,
(iii) average of all numbers. Output the results with
headings.
12. Write a C program to search an element using linear and 10 3 3
binary techniques.
13. Write a C program for (consider integer data): (i) Bubble 10 3 3
sort (ii) Linear search.
14. Write a C program to read N numbers into an array & 8 3 3
perform Linear search.
15. Write an algorithm and develop a C program that reads N 8 3 3
integer numbers and arranges them in ascending order
using Selection Sort.
16. Write an algorithm and develop a C program to search an 8 3 3
integer from N numbers in ascending order using Binary
Search technique.
17. Write a C program to find the transpose of a given matrix. 10 3 3
18. Write a C program that accepts two (3×3) ordered 8 3 3
matrices A and B and computes: (i) summation, (ii)
subtraction of matrices.
19 Write a C program to find the sum and average of n 5 2 3
integer numbers.
20 Write a C program to find the largest element in an array. 6 3 3
21 Write a C program to find the greatest number from a 6 3 3
two-dimensional array.
22 6 2 3
Define string. How is string declared and initialized?
Explain string input/output functions with an example.
23 What is a string? Write a C program that reads a sentence 6 3 3
and prints the frequency of each vowel.
24 Write a C program to eliminate multiple spaces from a 8 3 3
sentence and make it single.
25 Explain with syntax and example the different string 6 2 3
manipulation library functions.
26 Define string. List out all string manipulation functions. 6 2 3
Explain any two with example.
27 Explain how the elements of a one-dimensional array are 4 2 3
accessed in C. Illustrate with an example declaration and
accessing the 5th element.
28 Write a C function void findMax(int a[], int n) that returns 6 3 3
(via return value) the maximum element in the array a[] of
size n. Then show how you would call it from main().
29 Write the declaration for a two-dimensional array int B[4] 6 3 3
[5]; then write code to initialize every element of the array
to 0 using nested loops.
30 Explain how memory layout of a 2D array int M[3][4] is 4 2 3
in C (row-major). How would you access the element in
row 2, column 3?
31 Given int P[3][4] = {{1,2,3,4},{5,6,7,8}, 8 3 3
{9,10,11,12}};, what is the output of the following
loop?

32 Define a string in C. How is a string declared and 2 1 3


initialized using a character array?
33 Write a C program that reads a string (maximum length 6 3 3
100) and prints the number of vowels and consonants in it
(assuming only alphabets and ignoring other characters).
34 Explain how an array of structures could be used to store 4 2 3
student details (Roll No, Name, Marks). What are the
advantages of using arrays in this context?
35 Write a C program to read details of n employees 6 3 3
(EmployeeID, Name, Salary) into an array of structures,
then print the details of employees whose salary > 50000.
36 Define an array. List any four advantages of arrays. 2 1 3
37 Explain how arrays are passed to functions. Why are they 5 2 3
called “passed by reference”?
38 Differentiate between compile-time and runtime 5 3 3
initialization of arrays with examples.
39 Explain four different ways of initializing arrays in C. 5 2 3
40 What happens when you initialize an array without 4 2 3
specifying size? Explain with example.
41 Explain how array elements are accessed using indices. 5 3 3
Illustrate with address example.
42 Write a C program to input and display N elements using 6 3 3
an array.
43 Write a program to delete an element at a given index 6 3 3
from an array.
44 Write a program to compute sum and average of array 5 3 3
elements.
45 Explain how arrays are passed to functions. Why are they 5 2 3
called “passed by reference”?
46 Write a function that doubles each element of an array 6 3 3
(pass by reference).
47 Define a 2D array. Write syntax and memory layout for 4 2 3
int a[3][4].
48 Write the syntax and program to initialize and print a 2×3 6 3 3
matrix.
49 How are elements of a 2D array accessed using row and 4 2 3
column indices? Illustrate.
50 Write a C program to add two matrices. 8 3 3
51 Write a C program to multiply two matrices. 10 3 3
52 Explain how a 2D array is passed to a function. Give 8 3 3
syntax and example.

You might also like