OCS752-Introduction To C Programming
OCS752-Introduction To C Programming
com
QUESTION BANK
VII SEMESTER
OCS752 – INTRODUCTION TO C PROGRAMMING
Regulation – 2017
Prepared by
UNIT II ARRAYS
Introduction to Arrays – One dimensional arrays: Declaration – Initialization - Accessing elements –
Operations: Traversal, Insertion, Deletion, Searching - Two dimensional arrays: Declaration – Initialization
- Accessing elements – Operations: Read – Print – Sum – Transpose – Exercise Programs: Print the number
of positive and negative values present in the array – Sort the numbers using bubble sort - Find whether the
given is matrix is diagonal or not.
PART – A
Q. BT
Questions Competence
No. Level
1 Define Array. BTL1 Remembering
2 List out the classifications of an array? BTL1 Remembering
3 What is an array variable? How does it differ from an ordinary
BTL1 Remembering
variable?
4 Define bubble sort. BTL1 Remembering
5 Give the syntax of an array in C BTL1 Remembering
P=”SRMVEC”
Printf(“%d”,*&*p);
}
19 Create a C program to get the string from the keyboard and print the
BTL6 Creating
same.
20 Create a C program to find the sum of two values using Pointer BTL6 Creating
PART – B
1 Describe the string handling functions in C(13) BTL1 Remembering
2 What is pointer? How variable will be declared to the pointer?(13) BTL1 Remembering
3 Describe how pointers are used for handling characters strings(13) BTL1 Remembering
UNIT IV FUNCTIONS
Introduction to Functions – Types: User-defined and built-in functions - Function prototype – Function
definition - Function call - Parameter passing: Pass by value - Pass by reference - Built-in functions (string
functions) – Recursive functions – Exercise programs: Calculate the total amount of power consumed by „n‟
devices (passing an array to a function) – Menu-driven program to count the numbers which are divisible by
3, 5 and by both (passing an array to a function) – Replace the punctuations from a given sentence by the
space character (passing an array to a function)
PART – A
Q. BT
Questions Competence
No. Level
1 What are Pre-Defined Functions? Give example BTL1 Remembering
2 Define function in C BTL1 Remembering
3 List the types of function based on return values BTL1 Remembering
4 Define recursion BTL1 Remembering
5 Give the syntax of user defined function BTL1 Remembering
6 What are static functions? What is their use? BTL1 Remembering
7 Infer the different ways of passing parameters to the functions? Which BTL2 Understanding
to use when?
8 Outline the use of the function in C? BTL2 Understanding
9 Demonstrate what is meant by recursion with example BTL2 Understanding
10 Classify the Category of Function based on argument and return type BTL2 Understanding
UNIT V STRUCTURES
Introduction to structures – Declaration – Initialization – Accessing the members – Nested Structures –
Array of Structures – Structures and functions – Passing an entire structure – Exercise programs: Compute
the age of a person using structure and functions (passing a structure to a function) – Compute the number
of days an employee came late to the office by considering his arrival time for 30 days (Use array of
structures and functions)
PART – A
Q. BT
Questions Competence
No. Level
1 What is meant by structure BTL1 Remembering
2 Define Structure match in C that contains an integer quantity called
„won‟, an integer quantity called „lost‟, a floating pont quantity called BTL1 Remembering
„percentage‟, an array of 20 characters to hold the „name‟.
3 Tell how to access a member using structure BTL1 Remembering
4 Write a brief note on typedef BTL1 Remembering
5 What is meant by sizeof() of a structure BTL1 Remembering
6 List the ways in which passing structure to function BTL1 Remembering
7 Infer the relationship between a member and a structure BTL2 Understanding
8 Demonstrate structure tag and its purpose BTL2 Understanding
9 Consider the declaration
Struct
{
char name; BTL2 Understanding
int num;
} student;
Illustrate the application of size of operator to this structure
10 Outline Dot(.) operator BTL2 Understanding
11 Identify the advantages of structure type BTL3 Applying
12 Identify in how many ways a structure within a structure is written BTL3 Applying
13 What are the differences between structures and arrays? BTL3 Applying
14 Inspect how does a structure differ from an array BTL4 Analyzing
15 Inspect self-referential structure? BTL4 Analyzing
16 Analyze how the elements of a structure can be accessed BTL4 Analyzing
17 Judge whether you can assign one structure variable to another,
BTL5 Evaluating
provided they are of same type.
18 Can we pass the address of a structure variable to a function? BTL5 Evaluating
19 Formulate a suitable declaration using structure for time BTL6 Creating
20 Write a c Program to read and display the details of a student using
BTL6 Creating
structure
PART – B
1 Discuss the method of passing structure to a function with suitable
BTL1 Remembering
function.
2 What is Structure? How is it different from an array? How they are
BTL1 Remembering
defined and initialized? Explain with examples.
3 Define and declare a structure to store date, which including day, BTL1 Remembering
month and year
4 Give an example of a C structure and explain how members of the BTL1 Remembering
structure are accessed in a C program?