CS8251-Programming in C
CS8251-Programming in C
DEPARTMENT OF
GENERAL ENGINEERING
QUESTION BANK
II SEMESTER
CS8251-Programming in c
Regulation – 2017
Prepared by
Mr.S.Parthasarathy,AP/GE,Mr.R.Sangaranarayanan, AP/GE,
Mr.M.Asan Nainar,AP/MCA,Mr.G.Vivekanandan, AP/GE.
VALLIAMMAI ENGINEERING COLLEGE
SRM Nagar, Kattankulathur – 603 203.
QUESTION BANK
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
PART - A
Q.No Questions BT Level Competence
1. Define programming paradigm. BTL -1 Remember
2. Give two examples for assignment statements. BTL -1 Remember
3. Distinguish between character and string. BTL -2 Understand
4. What are keywords? Give an example. BTL -1 Remember
5. What do you mean by variables in ‘C’? BTL -1 Remember
6. Identify the use of ternary or conditional operator. BTL -4 Analyze
7. What is mean by Operators precedence and
BTL -2 Understand
associative?
8. What is a compilation process? BTL -1 Remember
9. How to create enumeration constants ? BTL -4 Analyze
10. Differentiate between an expression and a
BTL -4 Analyze
statement in C.
PART - B.
1. Describe the structure of a C program with an
example.(16) BTL -1 Remember
VALLIAMMAI ENGINEERING COLLEGE
SRM Nagar, Kattankulathur – 603 203.
QUESTION BANK
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
10. What are the different ways of initializing array? BTL -2 Understand
11. What is the use of ‘\0’ and ‘%s’? BTL -1 Remember
12. Is address operator used in scanf() statement to read an array?
Why? BTL -6 Create
VALLIAMMAI ENGINEERING COLLEGE
SRM Nagar, Kattankulathur – 603 203.
QUESTION BANK
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
UNIT III-FUNCTIONS AND POINTERS
Introduction to functions: Function prototype, function definition, function call, Built‐in functions
(string functions, math functions) – Recursion – Example Program: Computation of Sine series,
Scientific calculator using built‐in functions, Binary Search using recursive functions – Pointers –
Pointer operators – Pointer arithmetic – Arrays and pointers – Array of pointers – Example Program:
Sorting of names – Parameter passing: Pass by value, Pass by reference – Example Program:
Swapping of two numbers and changing the value of a variable using pass by reference.
PART - A
Q.No Questions BT Level Competence
1. Define pointer. How will you declare it?
BTL -1 Remember
2. What is a pointer to a pointer?
BTL -1 Remember
3. Express the operations that can be performed on pointers.
BTL -2 Understand
4. What is pointer arithmetic?
BTL -1 Remember
5. What is a void pointer and a null pointer?
BTL -1 Remember
6. Differentiate between address operator and indirection
BTL -4 Analyze
operator?
7. Why is pointer arithmetic not applicable on void pointers?
BTL -2 Understand
8. Identify the use of Pointer.
BTL -1 Remember
9. Point out the meaning of user‐defined function.
BTL -4 Analyze
10. What is meant by library function?
BTL -4 Analyze
11. Write the syntax for function declaration
BTL -3 Apply
12. Compose the two parts of function definition.
BTL -6 Create
13. What is meant by pass by value and pass by reference?
BTL -3 Apply
14. What is a function call? Give an example of a function call.
BTL -3 Apply
15. Invent the meaning of default arguments and command line
BTL -6 Create
arguments.
16. What is a recursive function?
BTL -2 Understand
17. Specify the need for function.
BTL -5 Evaluate
18. Assess the meaning of function pointer.
BTL -5 Evaluate
19. What is array of pointer?
BTL -1 Remember
20. Mention the advantage of pass by reference.
BTL -2 Understand
PART – B
VALLIAMMAI ENGINEERING COLLEGE
SRM Nagar, Kattankulathur – 603 203.
QUESTION BANK
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
UNIT-IV-STRUCTURES
SYLLABUS
Structure ‐ Nested structures – Pointer and Structures – Array of structures – Example Program
usingstructures and pointers – Self referential structures – Dynamic memory allocation ‐ Singly
linked list ‐typedef
PART – A
Q.No Questions BT Level Competence
5. Write a C program using structures to prepare the employee
pay roll of a company. (16) BTL -2 Understand
13. Illustrate a C program to store the employee information BTL -1 Remember
using structure and search a particular employee details. (16)
14. Define a structure called student that would contain name,
regno and marks of five subjects and percentage. Write a C
program to read the details of name, regno and marks of five
subjects for 30 students and calculate the percentage and BTL -4 Analyze
display the name, regno, marks of 30 subjects and percentage
of each student.(16)
QUESTION BANK
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
UNIT-V- FILE PROCESSING
Files – Types of file processing: Sequential access, Random access – Sequential access file ‐
Example Program: Finding average of numbers stored in sequential access file ‐ Random access file
‐Example Program: Transaction processing using random access files – Command line arguments
PART – A
Q.No Questions BT Level Competence
PART – B
1. Describe the following file manipulation functions with
examples.(16)
a) rename().(2)
b) freopen().(4) BTL -1 Remember
c) remove().(2)
d) tmpfile(void).(4)
e) fflush().(4)
2. Distinguish between the following functions.(16)
a) getc() and getchar().(4)
b) scanf() and fscanf().(4) BTL -2 Understand
c) printf() and fprintf().(4)
d) feof() and ferror().(4)
3. Illustrate and explain a C program to copy the contents of one
BTL -3 Apply
file into another.(16)
4. Explain the read and write operations on a file with an
BTL -2 Understand
suitable program.(16)
5. Describe the various functions used in a file with
example.(16) BTL -1 Remember
6. Write a C Program to print names of all Files present in a
Directory.(16) BTL -1 Remember
7. Write a C Program to read content of a File and display it.
(16) BTL -3 Apply
8. Write a C Program to print the contents of a File in
BTL -2 Understand
reverse.(16)
9. Write a C Program Transaction processing using random
BTL -6 Create
access files.(16)
10. Write a C program Finding average of numbers stored in Analyze
BTL -4
sequential access file.(16)
11. Explain about command line argument with suitable BTL -5 Evaluate
example.(16)
12. Compare Sequential access and Random access file .(16) BTL -4 Analyze