Está en la página 1de 3


I-B.TECH III-MID EXAMINATION ( Common to all branches)

DATE: TIME:90mins MARKS:30
1.Explain about the following :
a. Command line arguments
b. Types of files
2a. What are the various I/O operations performed on a file?
b. Write a program to copy the contents of one file to another?
3a. What is a data structure ?Explain about various data structures in brief?
b. Write a program to implement STACKS using ARRAYS ?
4a. Explain the efficiency of Bubble sort and Quick sort ?
b. Write a program on QUICK SORT?
5a. Explain the difference between Linear search and Binary search?
b. Write a program to search an element in a group of elements using Binary search Technique?

Paper set by

1. Which of the following is true for getc() [ ]
a. read a string from the file a character from the file c. read a character fom console
d. read a string fom console
2. which of the following are not I/O functions in C [ ]
a)fscanf() b)fseek() c)ftell() d)forward()
3.Command line functions are [ ]
a)Passed at runtime b)Passed at compile time c)Passed to main Function during preprocessing
of the program d)Passed during dynamic memory allocation
4.End of file is represented by__________ [ ]
a)eof b)EOF c)\0 d)Any garbage value
5.Which of the following is not a file access mode [ ]
a)r+ b)w+ c)a- d)a+
6._________ is a commonly used function for error handling [ ]
a)ferr() b)ferror() c)feof() d)None
7.Quick sort is an application of__________ [ ]
a)Partition exchange sort b)Partition sort
c)Greedy method d)Divide and conquer
8.Merge sort is an application of_______________ [ ]
a)Greedy method b)Divide and conquer c)a&b d)None
9.A queue is also called as a___________ [ ]
10.__________ is not a linear data structure [ ]
a)Stacks b)Queues c)Linked list d)Binary Tree
11.The value returned by fopen() function when the file is not opened is ________ [ ]
a) 0 b) garbage value c) NULL d) none of the above
12.In prefix notation,the operators are placed__________ the operands [ ]
a)After b)Between c)Before d)None
13.__________ operations are used to insert and delete elements onto the stack [ ]
a)insert,delete b)in,out c)push,pop d)None
14.The prefix equivalent for the postfix a+b*c+d is__________ [ ]
a)a+b*c+d b)+ab*+cd c)*+ab+cd d)*++abcd
15.In C files can be manipulated in _________ modes [ ]
a) Text b)Binary c) a & b d)Unary
16. Linked list uses __________ type of memory allocation [ ]
a) static b)random c)dynamic d)compile time
17. The data structure used in railway reservation is [ ]
a) stacks b) queues c)priority queues d) binary tree

18. _____ Search uses Divide and Conquer Strategy [ ]
a) Linear b) Binary c) Manual d) Olevel
19. Binary search is effective only when the elements are in [ ]
a) Sorted order b) Unsorted order c) a& b d)None
20.The fcloseall() function performs__________ [ ]
a) closing of all the files b) closes all the files that are opened by that program
c)closes only specified files d) none of the above