1. Write a C Program to create a sequential file with atleast 5
records, each record having the structure shown below:
|
Name |
Marks1 |
Marks2 |
Marks3 |
Non-zero
positive
integer |
25
Characters |
Positive
Integer |
Positive
Integer |
Positive
Integer |
Write necessary functions
a. To display all the records in the file.
b. To search for a specific record based on the USN. In case the
record is not found, suitable message should be displayed. Both the
options in this case must be demonstrated.
2. Write and demonstrate the following C functions:
a. newStrCpy that does the same job as strcpy
b. newStrCat that does the same job as strcat without using
any library functions.
3. Write a C Program, which accepts the Internet Protocol (IP)
address in decimal dot format (ex. 153.18.8.105) and converts it into
32-bit long integer (ex. 2568095849) using strtok library function
and unions.
4. Write a C Program to construct a stack of integers and to perform
the following operations on it:
a. Push
b. Pop
c. Display
The program should print appropriate messages for stack
overflow, stack underflow, and stack empty.
5. Write a C Program to convert and print a given valid
parenthesized infix arithmetic expression to postfix expression. The
expression consists of single character operands and the binary
operators + (plus), - (minus), * (multiply) and / (divide).
6. Write a C Program to evaluate a valid suffix/postfix expression
using stack. Assume that the suffix/postfix expression is read as a
single line consisting of non-negative single digit operands and
binary arithmetic operators. The arithmetic operators are + (add), -
(subtract), * (multiply) and / (divide).
7. Write a C Program to simulate the working of a queue of integers
using an array. Provide the following operations:
a. Insert
b. Delete
c. Display
8. Write a C Program to simulate the working of a circular queue of
integers using an array. Provide the following operations:
a. Insert
b. Delete
c. Display
9. Write a C Program using dynamic variables and pointers, to
construct a singly linked list consisting of the following information
in each node: student id (integer), student name (character string)
and semester (integer). The operations to be supported are:
a. The insertion operation
i. At the front of a list
ii. At the back of the list
iii. At any position in the list
b. Deleting a node based on student id. If the specified node
is not present in the list an error message should be
displayed. Both the options should be demonstrated.
c. Searching a node based on student id and update the
information content. If the specified node is not present in the list an error message should be displayed. Both
situations should be displayed.
d. Displaying all the nodes in the list.
(Note: Only one set of operations among a, b and c with d
may be asked in the examination)
10. Write a C Program using dynamic variables and pointers to
construct a stack of integers using singly linked list and to perform
the following operations:
a. Push
b. Pop
c. Display
The program should print appropriate messages for stack
overflow and stack empty.
11. Write a C program using dynamic variables and pointers to
construct a queue of integers using singly linked list and to perform
the following operations:
a. Insert
b. Delete
c. Display
The program should print appropriate messages for queue
full and queue empty.
12. Write a C Program to support the following operations on a
doubly linked list where each node consists of integers:
a. Create a doubly linked list by adding each node at the
front.
b. Insert a new node to the left of the node whose key value
is read as an input
c. Delete the node of a given data, if it is found, otherwise
display appropriate message.
d. Display the contents of the list.
(Note: Only either (a,b and d) or (a, c and d) may be asked
in the examination)
13. Write a C Program
a. To construct a binary search tree of integers.
b. To traverse the tree using all the methods i.e., inorder,
preorder and postorder.
c. To display the elements in the tree.
14. Write recursive C Programs for
a. Searching an element on a given list of integers using the
Binary Search method.
b. Solving the Towers of Hanoi problem.
* Note: In the examination each student picks one question from a lot of all 14
questions.