Академический Документы
Профессиональный Документы
Культура Документы
Sl No Questions Marks
1 What are logical operators? 1
2 Write the functionality of ‘void main( )’. 1
3 How are a negative integers stored in memory? 1
4 What is a queue data-structure? 1
5 What is the difference between ‘int’ and ‘unsigned int’ data types in 1
C?
6 What is the use of the preprocessor directive ‘#define’ in C? 1
7 Define ‘sibling’ node in a tree data-structure. 1
8 What is the role of ‘push()’ and ‘pop()’ functions in an array- 1
implementation of a stack?
9 a=5; b = a++ + ++a; What would the value of b be? 1
10 Write one difference between binary and non-binary tree. 1
11 What is meant by ‘token’ in C-language? 1
12 What does the preprocessor directive: ‘#include<conio.h>’ 1
accomplish ?
13 What is the use of ‘getch( )’ function in C?. 1
14 What is a ‘pointer’ in C ? 1
15 Differentiate between an array and an ordinary variable. 2
16 Which type of linked list comprises the adjacently placed first and 1
the last elements?
a. Singly Linked List b. Doubly Linked List
c. Circular Linked List d. All of the above
17 The declaration float a, b; reserves ______of memory for the 1
variables a & b.
[A] 1 byte [B] 4 bytes [C] 8 bytes [D] 16 bytes
18 Which of the following is not a relational operator? 1
[A] ! [ B] != [C] >= [D] <
19 Which of the following is an operator in C? 1
[A] , [B] $ [C] @ [D] None of these
20 Which among the following represents an unconditional loop in C? 1
[A] do-while [B] while [C] goto [D] for
21 C programming language was developed by: 1
[A] Dennis Ritchie [B] Ken Thompson [C] Bill Gates [D]
Peter Norton
22 C was developed in the year: 1
[A] 1970 [B] 1972 [C] 1976 [D] 1980
23 The maximum length of a variable of type ‘double’ in C is : 1
[A] 8 bits [B] 16 bits [C] 32 bits [D] 64 bits
24 The operator ‘&’ represents: 1
A] Bitwise AND [B] Bitwise OR [C] Logical AND [D]
Logical OR
25 Which of the following operators has the highest priority among 1
themselves?
[A] ++ [B] % [C] + [D] ||
26 Which header file must you include in your C program to make use 1
of the malloc() function?
[A] stdio.h [B] stdlib.h [C] conio.h [D] mem.h
27 An array ‘a’ is declared as: int a[8][6] . What is the number of 1
elements of the array ‘a’?
[A ] 2 [B] 14 [C] 48 [D] 86
28 In a linked list, each node contain minimum of two fields. One field 1
is ‘data-field’ to store the data. The second field is:
a) Pointer to character
b) Pointer to integer
c) Pointer to node
d) Node
29 Linked list is considered as an example of ___________ type of 1
memory allocation.
a) Dynamic
b) Static
c) Compile time
d) None of the mentioned
30 What is the need for a circular queue? 1
a) effective usage of memory
b) easier computations
c) all of the mentioned
d) none of the mentioned
31 Disadvantage of using array representation for binary trees is? 1
a) difficulty in knowing children nodes of a node
b) difficult in finding the parent of a node
c) have to know the maximum number of nodes possible before
creation of trees
d) difficult to implement
32 If you want to store dissimilar types of data together in C, then you 1
need to use:
a. array
b. structure
c. stack
d. None of the above.
33 int main() 1
{
a. size of array
b. pivot element
c. sequence of values
d. none of the above!
36 A complete graph can have 1
a . n2 spanning trees
b. nn - 2 spanning trees
c. nn + 1 spanning trees
d. nn spanning trees
37 What should be the value of rear (end) if the queue is full (elements 1
are completely occupied)?
a. 1
b. - 1
c. MAX + 1
d. MAX - 1
e. zero (null)
38 Which linear structure has a provision of Last-In-First-Out (LIFO) 1
mechanism for its elements?
a. Stack
b. Queue
c. Both a & b
d. None of the above
39 What should be the growing direction of two stacks while 1
implementing them in a similar array so as to reduce the overflow
chances?
a. Forward
b. Backward
c. Opposite
d. None of the above
40 Which expressions are also regarded as ‘Reverse Polish Notations’ 1
a. Prefix
b. Postfix
c. Infix
d. All of the above
41 Which of the following techniques represents the precise sequence 1
of an ‘In-Order Traversal’ of a Binary Tree?
a. Visit the Root, Traverse Left Subtree, Traverse Right Subtree
b. Traverse Left Subtree, Visit the Root, Traverse Right Subtree
c. Traverse Left Subtree, Traverse Right Subtree, Visit the Root
d. None of the Above
42 Which balance factor is stored in the new field introduced by an 1
AVL tree for the representation of a node?
a. Length
b. Height
c. Width
d. Information
43 What is meant by ‘Syntax Error’? 2
44 What is a global variable in C? 2
45 What is a nested loop? 2
46 What is the use of strlen() function in C or C++? 2
47 What are arithmetic operators? Name a few arithmetic operators. 2
48 Explain with examples the difference between ++i and i++ in C. 3
49 Illustrate with an example the use of ‘switch’ statement in C. 3
50 What are priority queues? 2
51 What is a linked list? 2
52 What is a node? Write the syntax for node creation in C or C++. 1+2+1
Write the syntax for pointing to the next node in C or C++.
53 What is the difference between a Stack and an Array? 2
54. What are the disadvantages of array implementation of a linked list? 3
55 What is quicksort algorithm? 5
56 a.Write two disadvantages of C-language. 1+(1+2)+2+4
b. What are dentifiers in C? How can you check if a string is an
identifier or not?
c. Find the identifiers in the following C-program:
void main()
{
int a123 = 25;
char b_1;
}
d. Write a program in C to multiply and divide two integers and
produce a result up to eight digits (integers) in case of multiplication
and three decimal digits in case of division.
57 a. Explain with an example what is meant by ‘Mixed mode (1+1)+4+4
arithmetic expression’?
b. Write the meaning of the following operators: %, <=, ||, /=, &=,
++, ?:, sizeof( ).
c. Write a program in C which can store an array of length 10, the
elements of the array being read from the user and display the array-
elements in reverse sequence.
58 a. What is meant by object oriented programming? 1+(2+2+1)
b. Explain in brief the terms:Polymorphism, Inheritance, and +1+2+1
Encapsulation.
c. How can you create a structure in C?
d. What is a ‘nested structure’? Give a suitable example.
e. What is the advantage of using ‘typedef’ with a Structure?
59 a. Write the difference between the ‘for’ loop and ‘while’ loop (1+2+2)+
constructs in C. Also write two programs in C to print (1+1)+3
the prime numbers from 1 to 100 using the above two different loop
constructs.
b. What is a standard library function? Give an example.
c. Write a function in C which can return the maximum of two real
numbers.
60 a. Write a C program in C or C++ to sort the integers: 16 50 37 56 3+3+2+2
47 85 30 9 in ascending order using merge-sort algorithm.
b. Write a C or C++ proram to perform the same sorting as above
using the bubble sort algorithm.
c. Compare the worst-case time complexity for the two sorting
algorithms stated above.
d. What is insertion sort.
61 a. Define binary tree and binary search tree (BST). Differentiate (2+2)+3+3
between them.
b. Write down the different traversal processes in a BST.
c.Write the order of the different types of traversal in the tree below: