1.
When a computer is first turned on or restarted, a special type of absolute loader called ____ is executed
A. 
B. 
C. 
D. 
2.
The time factor when determining the efficiency of algorithm is measured by
A. 
B. 
Counting the number of key operations
C. 
Counting the number of statements
D. 
Counting the kilobytes of algorithm
3.
Which of the following case does not exist in complexity theory
A. 
B. 
C. 
D. 
4.
The Worst case occur in linear search algorithm when
A. 
Item is somewhere in the middle of the array
B. 
Item is not in the array at all
C. 
Item is the last element in the array
D. 
Item is the last element in the array or is not there at all
5.
Linked lists are best suited
A. 
For relatively permanent collections of data
B. 
for the size of the structure and the data in the structure are constantly changing
C. 
For both of above situation
D. 
For none of above situation
6.
Multiprogramming systems:
A. 
Are easier to develop than single programming systems
B. 
C. 
Execute more jobs in the same time period
D. 
Are used only one large mainframe computers.
7.
Given the language L = {ab, aa, baa}, which of the following strings are in L*? (Multiple correct type)
A. 
B. 
C. 
D. 
8.
Which one of the following is an example of storage class in C?
A. 
B. 
C. 
D. 
9.
Which one of the following is the correct way of declaring main() function when it receives command line arguments?
A. 
Main(int argc, char argv)
B. 
Main(char argv[ ], int *argc)
C. 
Main(char* argv[ ],int argc)
D. 
Main(int argc,char* argv[ ])
10.
Which of the following is a correct way of defining a symbolic constant pie in C
A. 
B. 
C. 
D. 
11.
What should be the output of the following C code :
#include <stdio.h>
int main() {
static int y;
printf(“%d\n”, y);
return 0;
}
A. 
B. 
C. 
D. 
12.
Consider the following pseudo-code. Assume that IntQueue is a class implementing an integer queue, enqueue() and dequeue() are member functions for inserting and deleting values to/from a queue object respectively.
What does the function fun() do?
void fun(int n)
{
IntQueue q;
q.enqueue(0);
q.enqueue(1);
for (int i = 0; i < n; i++)
{
int a = q.dequeue();
int b = q.dequeue();
q.enqueue(b);
q.enqueue(a + b);
print(a);
}
}
A. 
Prints numbers from 0 to n-1
B. 
Prints numbers from n-1 to 0
C. 
Prints first n Fibonacci numbers
D. 
Prints first n Fibonacci numbers in reverse order.
13.
The output of the below C code is :
#include <stdio.h>
float func(int aa, float bb) {
return ((float)aa + bb);
}
int main() {
int a;
a = func(10, 3.14);
printf("%d\n", a);
return 0;
}
A. 
B. 
C. 
D. 
14.
What is the output of the following program?
#include<stdio.h>
void main()
{
struct { int x;} var = {5}, *p = &var;
printf("%d %d %d", var.x, p->x, (*p).x);
}
A. 
B. 
C. 
D. 
15.
What is the output of this C code?
#include <stdio.h>
void main()
{
int y = 97;
int x = y++;
printf("x is %d", x);
}
A. 
B. 
C. 
D. 
16.
What is the output of the below C code?
#include <stdio.h>
void main()
{
char *s = "hello";
char *p = s;
printf("%p %p", p, s);
}
A. 
Different addresses are printed
B. 
Same address is printed separated by a space
C. 
D. 
17.
What is common in three different types of traversals (Inorder, Preorder, and Postorder)?
A. 
Root is visited before right subtree
B. 
Left subtree is always visited before right subtree
C. 
Root is visited after left subtree
D. 
18.
Find out the correct statement for the following program
#include "stdio.h"
int * arrPtr[5];
int main()
{
if(*(arrPtr+2) == *(arrPtr+4))
{
printf("Equal!");
}
else
{
printf("Not Equal");
}
return 0;
}
A. 
B. 
It’ll always print Equal.
C. 
It’ll always print Not Equal.
D. 
Since elements of arrPtr aren’t initialized in the program, it’ll print either Equal or Not Equal.
19.
#include <stdio.h>
void f(int *p, int *q)
{
p = q;
*p = 2;
}
int i = 0, j = 1;
int main()
{
f(&i, &j);
printf("%d%d\n", i, j);
return 0;
}
A. 
B. 
C. 
D. 
20.
Is it possible to create a doubly linked list using only one pointer with every node?
A. 
B. 
Yes, possible by storing XOR of addresses of previous and next nodes.
C. 
Yes, possible by storing XNOR of addresses of previous and next nodes.
D. 
Yes, possible by storing XOR of the current node and previous node
21.
The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?
A. 
10, 20, 15, 23, 25, 35, 42, 39, 30
B. 
15, 10, 25, 23, 20, 42, 35, 39, 30
C. 
15, 20, 10, 23, 25, 42, 35, 39, 30
D. 
15, 10, 23, 25, 20, 35, 42, 39, 30
22.
What is the return type of malloc() or calloc() ?
A. 
B. 
A pointer of allocated memory type
C. 
D. 
23.
Predict the output of the below program:
#include <stdio.h>
#define EVEN 0
#define ODD 1
int main()
{
int i = 3;
switch (i & 1)
{
case EVEN: printf("Even");
break;
case ODD: printf("Odd");
break;
default: printf("Default");
}
return 0;
}
A. 
B. 
C. 
D. 
24.
Consider the following C declaration
struct {
short s[5];
union {
float y;
long z;
}u;
} t;
Assume that objects of the type short, float and long occupy 2 bytes, 4 bytes, and 8 bytes, respectively. The memory requirement for variable t, ignoring alignment considerations, is
A. 
B. 
C. 
D. 
25.
What is the time complexity to search for an element using hashing.
A. 
B. 
C. 
D.