Sans Pareil –Technical Test

Date : 31.12.2016

1.If any undirected graph ,the sum of degrees of all the nodes
A. / Need not be even
B. / Must be odd
C. / Is twice the number of edges
D. / Must be even
2.What is the postfix form of the following prefix *+ab–cd
A. / ab+cd–*
B. / abc+*–
C. / ab+*cd–
D. / ab+*cd–
3.Which of the following sorting methods would be most suitable for sorting a list which is almost sorted
A. / Bubble Sort
B. / Insertion Sort
C. / Selection Sort
D. / Quick Sort
4.The complexity of searching an element from a set of n elements using Binary search algorithm is
A. / O(n)
B. / O(log n)
C. / O(n2)
D. / O(n log n)
5.Tree
A. / Is a bipartite graph
B. / With n node contains n-1 edges
C. / Is a connected graph
D. / All of these
6.Preorder is nothing but
A. / Depth first order
B. / Breadth first order
C. / Topological order
D. / Linear order
7.Which of the following sorting method is stable?
A. / Straight insertion sort
B. / Binary insertion sort
C. / Shell sort
D. / Heap sort
8.Traversing a binary tree first root and then left and right subtrees called
A. / Postorder
B. / Preorder
C. / Inorder
D. / None of these
9.What is the postfix form of the following prefix expression -A/B*C$DE
A. / ABCDE$*/-
B. / A-BCDE$*/-
C. / ABC$ED*/-
D. / A-BCDE$*/
10.A graph in which all nodes are of equal degrees is known as
A. / Complete graph
B. / Regular graph
C. / Non regular graph
D. / Multi graph
11.If the binary search algorithm determines that the search arguments is in the upper half of the array,which of the following statements will set the appropriate value?
A. / Start sub = middle sub-1
B. / Start sub = middle+1
C. / Stop sub= middle-1
D. / Stop sub = middle sub + 1

12.Output of the following program fragment is x = 5; y = x++; printf(“%d%d”, x, y);

A. / 5, 6
B. / 5, 5
C. / 6, 5
D. / 6, 6
13.What is the correct value to return to the operating system upon the successful completion of a program?
A. / -1
B. / 1
C. / 0
D. / Programs do not return a value.
14.Consider the following program main ( ) { float a = 0.5, b = 0.7; if (b < 0.8) if (a < 0.5) printf (“ABCD”); else printf (“PQR”); else printf (“JKLF); } The output is
A. / ABCD
B. / PQR
C. / JKLF
D. / None of these
15.Which of the following data structure is used to represent hierarchical relationship among its elements?
A. / Graph
B. / Tree
C. / Hash Table
D. / Queue
16.A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a
A. / Queue
B. / Stack
C. / Tree
D. / Linked list
17.A language in which a statement in a loop that run 100 times and is decoded 100 times is
A. / BASIC
B. / FORTAN
C. / COBAL
D. / PASCAL
18.The information about an array used in a program will be sorted in
A. / Symbol table
B. / Activation table
C. / System table
D. / Dope vector
19.If an array is used as function argument, the array is passed
A. / By value
B. / By reference
C. / By name
D. / The array cannot be used as a function argument
20.Linked lists are not suitable data structures for which one of the following problems
A. / Insertion sort
B. / Binary search
C. / Radix sort
D. / Polynomial manipulation
21.If a binary tree satisfies shape and order property its known as
A. / Binary Search Tree
B. / Sequential Search Tree
C. / Heap
D. / Rooted Tree
22.What is the output of the following program segment? main() { int i = 1; do { printf(“%d..”, i); } while(i--); }
A. / 0..1..
B. / 1..0..
C. / 0
D. / -1
23.What would be output of the following program? #include "stdio.h" main() { printf(“%d%d”, size of (NULL!), size of (“ “)); }
A. / 2 1
B. / 1 2
C. / 2 2
D. / 1 1
24.The parallel operation is preferred because
A. / Circuitry is simple
B. / It requires less memory
C. / It is faster than series operation
D. / All of these
25.The most relevant addressing mode to write position independent codes is
A. / Direct mode
B. / Indirect mode
C. / Relative mode
D. / Indexed mode
26.ADI means
A. / Add to Accumulator using carry Flag
B. / Add to Accumulator
C. / Add Immediate data to Accumulator
D. / Add Immediate data to Accumulator Using carry
27.A charge coupled device has
A. / Low cost per bit
B. / High cost per bit
C. / Low density
D. / None of these
28.To put the microprocessor in the wait state
A. / Lower the HOLD input
B. / Lower the READY input
C. / Raise the HOLD input
D. / Raise the READY input
29.Hardwired control units are faster than micro programmed control unit because
A. / They do not consist of slower memory elements
B. / They do not have slower element such as gates and flip flops
C. / They are made using faster VLSI design technology
D. / None of Above
30.Which of the following are typical characteristics of a RISC machine?
A. / Highly pipielined
B. / Multiple register sets
C. / Both a and b
D. / None of these
31.In magnetic disk data organized on the plotter in a concentric sets or rings called
A. / Sector
B. / Track
C. / Head
D. / Block
32.When a sub class is inherited from only one super class .It is known as
A. / Single inheritance
B. / Multiple inheritance
C. / Hierarchical inheritance
D. / Multilevel inheritance
33.The address of a variable temp of type float is
A. / *temp
B. / &temp
C. / float& temp
D. / float temp&
34.It is possible to declare as a friend
A. / A member function
B. / A global function
C. / A class
D. / All of the above
35.If a class C is derived from class B, which is derived from class A, all through public inheritance, then a class C member function can access
A. / Protected and public data only in C and B
B. / Protected and public data only in C
C. / Private data in A and B
D. / Protected data in A and B
36.What will be the output of the following program? #include void main() { float x=5,y=2; int result; result=x % y; cout<="" span="">
A. / 1
B. / 1.0
C. / Error message
D. / 2.5
37.A pure virtual function is a virtual function that
A. / Has no body
B. / Returns nothing
C. / Is used in base class
D. / Both (A) and (C)
38.What is the output of the following code char symbol[3]={‘a’,‘b’,‘c’}; for (int index=0; index<3; index++) cout < symbol [index];
A. / a b c
B. / “abc”
C. / abc
D. / ‘abc’
39.Use of virtual functions implies
A. / Overloading
B. / Overriding
C. / Static binding
D. / Dynamic binding
40.If we create a file by ‘ifstream’, then the default mode of the file is ______
A. / ios :: out
B. / ios :: in
C. / ios :: app
D. / ios :: binary
41.What is the reference count field in the inode?
A. / It counts the number of processes currently executing in the inode.
B. / It counts the number of hard links presently pointing at a particular inode.
C. / It count the size of memory required by the inode.
D. / None of the above.
42.Which one is best for memory allocation?
A. / First fit
B. / Best fit
C. / Worst fit
D. / All of these
43.The cylinder skew problem is concern with which of the following
A. / Semaphore
B. / Thrashing
C. / Interleaving
D. / Deadlock
44.Indefinite blocking is called
A. / Deadlock
B. / Starvation
C. / Both a and b
D. / None of these
45.YACC builds up
A. / SLR parsing table
B. / Canonical LR parsing table
C. / LALR parsing table
D. / None of the above
46.A synthesized attribute is an attribute whose value at a parse tree node depends on
A. / Attributes at the siblings only
B. / Attributes at parent node only
C. / Attributes at children nodes only
D. / None of the above
47.Hash tables can contribute to an efficient average case solution for all of the following problems described below except
A. / Counting distinct values
B. / Dynamic dictionary
C. / Range search
D. / Symbol table lookup
48.In a bottom up evaluation of a syntax direction definition ,inherited attributes can
A. / Always be evaluated
B. / Be evaluated only if the definition is L -attributed
C. / Be evaluated only if the definition has synthesized attributes
D. / None of the above
49.An optimizer compiler
A. / Is optimized to occupy less space
B. / Is optimized to take less time for execution
C. / Optimizes the code
D. / None of these
50.The graph that shows basic blocks and their successor relationship is called
A. / DAG
B. / Flow chart
C. / Control graph
D. / Hamiltonian graph
51. ______or scanning is the process where the stream of characters making up the source program is read from left to right and grouped into tokens.
A. / Lexical analysis
B. / Diversion
C. / Modeling
D. / None of the above
52.The output of a lexical analyzer is
A. / Machine code
B. / Intermediate code
C. / A stream of tokens
D. / A parse tree
53.Task of the lexical analysis
A. / To parse the source program into the basic elements or tokens of the language
B. / To build a literal table and an identifier table
C. / To build a uniform symbol table
D. / All of these
54.Every BCNF decomposition is
A. / Dependency preserving
B. / Not dependency preserving
C. / Need be dependency preserving
D. / None of these
55.Files that require immediate access, must be stored on_____
A. / Slow devices
B. / Faster devices
C. / Medium devices
D. / All of these
56.Which of the following is not a file operation?
A. / FindNext
B. / Find
C. / Reset
D. / None of the above
57.In secondary index
A. / The data file is ordered by the attribute that is also the search key in the index file
B. / In secondary index the data file is ordered by an attribute that is different from the search key in the index file
C. / In multi-level index an index structure consisting of 2 or more tiers of records where an upper tier records point to associated index records of the tier below
D. / None of above
58.In SQL the ALTER TABLE SPACE command is used
A. / To add/rename data files
B. / To change storage characteristics
C. / To take a table space online/offline
D. / None of the above
59.Functional dependencies are a generalization of
A. / Key dependencies
B. / Relation dependencies
C. / Database dependencies
D. / None of these
60.A relation in which the intersection of each row and column contains one and only one value is said to be in
A. / First normal form
B. / Second normal form
C. / Third normal form
D. / Fourth normal form
61.A B tree used as an index for a large database table has four levels including the root node.If a new is key inserted in this index ,then the maximum number of nodes that could be newly created in the process are
A. / 5
B. / 4
C. / 3
D. / 2
62.In a client/server networking environment the processing
A. / Takes place only on the client side
B. / Of request by the client is handled by the server
C. / Takes place only on the server side
D. / None of these
63. IEEE802.11i standard included an encryption scheme is known as
A. / Wireless Security
B. / WEP (Wired Equivalent Privacy)
C. / WiFi Protected Access
D. / WiFi Protected Protocol
64.Which of the following has the smallest default maximum physical receive packet size?
A. / ARCnet
B. / Ethernet
C. / Token ring[4Mbps]
D. / Token ring[16Mbps]
65. IEEE 802.10 standard for
A. / Overview and Architecture
B. / Token bus
C. / Token Ring
D. / Virtual LAN and Security
66. IEEE 802.15 standard for
A. / Wireless LAN (WiFi)
B. / Broadband wireless
C. / Personal Area Network
D. / Wireless Regional Area Network
67.Which type of switching uses the entire capacity of a dedicated link?
A. / Circuit switching
B. / Virtual Circuit Packet Switching
C. / Datagram Packet Switching
D. / Message switching
68. DNS is used to locate the
A. / MAC address of URL
B. / IP address of URL
C. / Root domain of URL
D. / Domain name of a URL
69.On which layer of the OSI model the router configuration reside :-
A. / Transport
B. / Network
C. / Logical link
D. / Physical
70. A small network making up the internet and also having a small number of computers with in it is called
A. / Host
B. / Address
C. / Sub domain
D. / Domain
71.Which is reserved address for private networks?
A. / 150.0.0.0 to 150.255.255.255
B. / 128.0.0.0 to 191.255.255.255
C. / 192.168.0.0 to 192.168.255.255
D. / 202.40.55.0 to 202.40.55.255
72. The store and forward mechanism is used in
A. / Packet switching
B. / Message switching
C. / Circuit switching
D. / Data gram switching
73.How many Registry centers have been defined for IPv6
A. / 3
B. / 4
C. / 5
D. / 6
74. What will be output when you will execute following c code?
#include<stdio.h>
#define var 3
int main(){
char *cricket[var+~0]={"clarke","kallis"};
char *ptr=cricket[1+~0];
printf("%c",*++ptr);
return 0;
}
Choose all that apply:
(A) a
(B) r
(C) l
(D) Compilation error
(E) None of the above
75. What will be output of the following c program?
#include<stdio.h>
int main(){
int goto=5;
printf("%d",goto);
return 0;
}
(A) 5
(B) **
(C) **
(D) Compilation error
(E) None of these
76. What will be output of the following program?
#include<stdio.h>
int main(){
int i=5,j;
j=++i+++i+++i;
printf("%d %d",i,j);
return 0;
}
(A) 7 21
(B) 8 21
(C) 7 24
(D) 8 24
(E) Compilation error
77. What will be output of the following c program?
#include<stdio.h>
int main(){
int class=150;
int public=25;
int private=30;
class = class > private - public;
printf("%d",class);
return 0;
}
(A) 1
(B) 2
(C) 4
(D) Compilation error
78.What will be output when you will execute following c code?
#define True 5==5
#include<stdio.h>
int main(){
if(.001-0.1f)
printf("David Beckham");
else if(True)
printf("Ronaldinho");
else
printf("Cristiano Ronaldo");
return 0;
Choose all that apply:
A)David Beckham
(B)Ronaldinho
(C)Cristiano Ronaldo
(D)Warning: Condition is always true
(E)Warning: Unreachable code
79.What will be output when you will execute following c code?
#include<stdio.h>
int main(){
int check=2;
switch(check){
case 1: printf("D.W.Steyn");
case 2: printf(" M.G.Johnson");
case 3: printf(" Mohammad Asif");
default: printf(" M.Muralidaran");
}
return 0;
}
Choose all that apply:
(A) M.G.Johnson
(B) M.Muralidaran
(C) M.G.Johnson Mohammad Asif M.Muralidaran
(D) Compilation error
(E) None of the above
80. What will be output of following c code?
#include<stdio.h>
int main(){
int i=2,j=2;
while(i+1?--i:j++)
printf("%d",i);
return 0;
}
(A)1
(B)2
(C)3
(D)4
(E)Compilation error
81.What will be output of following c code?
#include<stdio.h>
int main(){
int i,j;
i=j=2,3;
while(--i&j++)
printf("%d %d",i,j);
return 0;
}
(A) 2
(B) 3
(C) 13
(D)Infinite loop
(E) Compilation error
82. What will be output of following program?
#include<stdio.h>
int main(){
int i = 3;
int *j;
int **k;
j=&i;
k=&j;
printf(%u %u %d ”,k,*k,**k);
return 0;
}
(A) Address, Address, 3
(B) Address, 3, 3
(C) 3, 3, 3
(D) Compilation error
(E) None of above
83.What is size of generic pointer in c?
(A) 0
(B) 1
(C) 2
(D) Null
(E) Undefined
84. #include<stdio.h>
int main(){
int const SIZE=5;
int expr;
double value[SIZE]={2.0,4.0,6.0,8.0,10.0};
expr=1|2|3|4;
printf("%f",value[expr]);
return 0;
}
(A) 2.000000
(B) 4.000000
(C) 6.000000
(D) 8.000000
(E) Compilation error
85. What will be output when you will execute following c code?
#include<stdio.h>
int main(){
int const SIZE=5;
int expr;
double value[SIZE]={2.0,4.0,6.0,8.0,10.0};
expr=1|2|3|4;
printf("%f",value[expr]);
return 0;
}
Choose all that apply:
(A) 2.000000
(B) 4.000000
(C) 8.000000
(D) Compilation error
(E) None of the above
86. What will be output of the following program?
#include<stdio.h>
int main(){
int i=1;
i=2+2*i++;
printf("%d",i);
return 0;
}
(A) 4
(B) 5
(C) 6
(D) 7
(E)Compilation error
87.What will be output when you will execute following c code?
#include<stdio.h>
int main(){
int a=5,b=10,c=1;
if(a&b>c){
printf("cquestionbank");
}
else{
break;
}
return 0;
}
Choose all that apply:
(A)cquestionbank
(B)It will print nothing
(C)Run time error
(D)Compilation error
(E)None of the above
88. What will be output when you will execute following c code?
#include<stdio.h>
int main(){
int a=100;
if(a>10)
printf("M.S. Dhoni");
else if(a>20)
printf("M.E.K Hussey");
else if(a>30)
printf("A.B. de villiers");
return 0;
Choose all that apply:
(A)M.S. Dhoni
(B)A.B. de villiers
(C)M.S Dhoni
M.E.K Hussey
A.B. de Villiers
(D)Compilation error: More than one conditions are true
(E)None of the above
89.#include<stdio.h>
#define L 10
int main(){
auto money=10;
switch(money,money*2){
case L: printf("Willian");
break;
case L*2:printf("Warren");
break;
case L*3:printf("Carlos");
break;
default: printf("Lawrence");
case L*4:printf("Inqvar");
break;
}
return 0;
Choose all that apply:
(A) Willian
(B) Warren
(C) Lawrence Inqvar
(D) Compilation error: Misplaced default
(E) None of the above
90. What will be output of following c code?
#include<stdio.h>
int main(){
int x=011,i;
for(i=0;i<x;i+=3){
printf("Start ");
continue;
printf("End");
}
return 0;
}
(A) End End End
(B) Start Start Start
(C) Start End Start
(D) Start Start Start Start
(E) Compilation error
91.What will be output if you will execute following c code?
#include<stdio.h>
int main(){
char arr[11]="The African Queen";
printf("%s",arr);
return 0;
}
(A) The African Queen
(B) The
(C) Queen
(D) null
(E) Compilation error
92. What will be output when you will execute following c code?
#include<stdio.h>
int main(){
char arr[7]="Network";
printf("%s",arr);
return 0;
}
Choose all that apply:
(A) Network
(B) N
(C) Garbage value
(D) Compilation error
(E) None of the above