PPS Bit Bank
PPS Bit Bank
[ ]
a) # b) $ c} “ “ d) None of the mentioned
2. What is the output of the following code ?
#include<stdio.h>
#define X 10
Int main()
{
X++;
printf(“%d”,X);
return 0;
} [ ]
a)10 b)11 c)Compilation error d)Not defined
6. The C library that contains the prototype statement for file operation is [ ]
e)stdlib.h
7. Which of the following file modes open a file in the write state for updating?
a) ab b) a+b c) rb d) r+b e) wb [ ]
a)Add ,change and delete transactions are used to update the file. [ ]
1
9. Which of the following statement about files is false ? [ ]
b)Binary files contain data stored in the internal format of the computer.
e) some text file data need to be converted to internal storge formats for processing.
1. The ______________function read the next character from the standard input steam and
return its value.
2. User files are created using the ____________type.
3. If a file does not exist, the append mode returns an ____________.
4. The ____________specifies the type of data that being formatted in formatting
input/output.
5. The ______________ function may be used to position a file at the beginning.
6. The _______________function may be used to close the file.
7. A ______________ is one or more fields that uniquely identify the data in a file.
8. The ___________ results when a failures occurs during on open or during either a read or
write operations.
9. A file can be read only if it is in_____________.
10. A file opened in the ______________ mode is a binary file opened in the read state and
update mode.
11. Using__________ to position of a file beyond the current end of file places the file in an
error state.
2
1. To tell the complier to store data at an address, use the [ ]
a) Address operator (&) b) Array operator ([])
c)Pointer operator (^) d)Indirective operator
2. The function that return the absolute value of a long integer is [ ]
a) Abs b) dabs c)fabs d)labs e)tabs
3. Give the following definitions. [ ]
int x;
int *p=&x;
int **pp=&p;
3
1. What is the worst case time complexity of linear search algorithm? [ ]
a) o(1) b) o(log n) c)o(n) d)o(n^2)
2. Finding the location of a given item in a collection of items is called [ ]
a) Discovering b) Finding c) Searching d) Minig
3. Complexity of linear search algorithm is [ ]
a) o(n) b)o(log n) c)o(n^2) d)o(n log n)
4. Binary search algorithm cannot be applied to [ ]
a) Sorted linked list b)Sorted binary tree
5. The processor through which data are arranged according to their value is known as
a) Arranging b)Listing c)Parsing d)Sorting e)Searching [ ]
6. The__________ search locates the target item by starting at the beginning and moving
towards the end of the list [ ]
a) Ascending b) Binary c)Bubble d)Selection e)sequential
7. The______ sort finds the smallest element from the unsorted sublist and swaps it with
the element at the beginning of the unsorted of the unsorted data. [ ]
a) Bubble b)Exchange c)Insertion d)Quick e)selection
8. Which of the following is not the required condition for binary search algorithm?
a) The list must be sorted [ ]
b) These should be the direct access to the middle element in any sub list
c) There must be mechanism to delete and or insert element list
d) Number values should only be present
9. The average case occurs in linear search algorithm [ ]
a) When item is somewhere in the middle of the array
b) When item is not the array at all
c) When item is the last element in the array
d) Item is the last element in the array
10. Which of the following statements about a sequential search is false?
a) Any array can be searched using the sequential search. [ ]
b) If the target is not found, every element in the list is tested.
c) The efficiency of the sequential search is o(n).
d) The list must be ordered
e) The sequential search is generally recommended only for small files
4
10. Because of its efficiency , the ______________ search is the best search for any array,
regardless of its size and order.