The difference between a named pipe and a regular file in Unix is that
Sign in
Please select an account to continue using cracku.in
↓ →
The difference between a named pipe and a regular file in Unix is that
A class of 30 students occupy a classroom containing 5 rows of seats, with 8 seats in each row. If the students seat themselves at random, the probability that the sixth seat in the fifth row will be empty is
The domain ofthe function $$\log(\log \sin(x))$$ is
The following paradigm can be usedto find the solution of the problem in minimum time:
Given a set of non-negative integer, and a value K, determine if there is a subset of the given set with sum equalto K:
(G, *) is an abelian group. Then
Consider the following C code segment:
#include <stdio.h>
main()
{
int i, j, x;
scanf("%d", &x);
i = 1; j = 1;
while(1 < 10){
j = j * i;
i = i + 1;
if(i == x)break;
}
}
For the program fragment above, which of the following statements about the variables i and j must be true after execution of this program? [ !(exclamation) sign denotes factorial in the answer ]
A computer uses ternary system instead of the traditional binary system. An n bit string in the binary system will occupy
Which of the following is application of Breath First Search on the graph?
Micro program is
Given twosorted list of size m and n respectively. The number of comparisons needed the worst case by the mergesort algorithm will be
In unit testing of a module, it is found that for a set of test data, at the maximum 90% of the code alone weretested with the probability of success 0.9. The reliability of the module is
In a file which contains 1 million records and the order of the tree is 100, then what is the maximum number of nodesto be accessed if B+ tree index is used?
A particular disk unit uses a bit string to record the occupancy or vacancyof its tracks, with 0 denoting vacant and I for occupied. A 32-bit segment of this string has hexadecimal value D4FE2003. The percentage of occupied tracks for the corresponding part of the disk, to the nearest percentage is
Which of the following is dense index?
In E-R model,Y is the dominant entity and X is subordinate entity
Of the following, which best characterizes computers that use memory-mapped I/O?
Of the following sorting algorithms, which has a running time thatis least dependent on the initial ordering of the input?
Processes P1 and P2 have a producer-consumer relationship, communicating by the use of a set of shared buffers.
P1: repeat
Obtain an empty buffer
Fill it
Return a full buffer
forever
P2: repeat
Obtain a full buffer
Empty it
Return an empty buffer
forever
Increasing the number of buffersis likely to do which of the following?
I. Increase the rate at which requests are satisfied (throughput)
II. Decrease the likelihood of deadlock
III. Increase the ease of achieving a correct implementation
A doubly linked list is declared as
struct Node {
int Value ;
struct Node *Fwd ;
struct Node *Bwd ;
};
Where Fwd and Bwd represent forward and backward link to the adjacent elements of the list. Which of the following segments of code deletes the node pointed to by X from the doublylinked list, if it is assumedthat X points to neither the first nor the last node of the list?
If Tree-1 and Tree-2 are the trees indicated below :

Which traversals of Tree-1 and Tree-2, respectively, will produce the same sequence?

In the diagram above, the inverter (NOT gate) and the AND-gates labeled 1 and 2 have delays of 9, 10 and 12 nanoseconds(ns), respectively. Wire delays are negligible. For certain values of a and c, together with certain transition of b, a glitch (spurious output) is generated for a short time, after which the output assumes its correct value. The duration of the glitch is
Which of the following comparisons between static and dynamic type checking is incorrect?
..................... can detect burst error of length less than or equal to degree of the polynomial and detects burst errors that affect odd number of bits.
An array A consists of n integers in locations A[O], A[1] ....A[n-1]. It is required to shift the elements of the array cyclically to the left by k places, where $$1 \leq k \leq (n-1)$$. An incomplete algorithm for doing this in linear time, without using another array is given below. Complete the algorithm byfilling in the blanks. Assume alt the variables are suitably declared.
min = n ; i = 0;
while (..........){
temp = A[i] ; j = i ;
while (........){
A[j] = ...........;
j = (j + k) mod n;
if (j < min) then
min = j ;
}
A[(n + i - k) mod n] = .............;
i = ...........;
}
Station A uses 32 byte packets to transmit messages to Station B using a sliding window protocol. The round trip delay between A and is 80 ms and the bottleneck bandwidth on the path between A and B is 128 kbps. What is the optimal window size that A should use?
Assuming that for a given network layer implementation, connection establishment overhead ts 100 bytes and disconnection overhead is 28 bytes. What would be the minimum size of the packet the transport layer needs to keep up, if it wishes to implement a datagram service above the network layer and needs to keep its overhead to a minimum of 12.5%. (Ignore transport layer overhead)
In cryptography, the following usestransposition ciphers and the keyword is LAYER. Encrypt the following message. (Spaces are omitted during encryption)
WELCOME TO NETWORK SECURITY !
In a particular program, it is found that 1% of the code accounts for 50% of the execution time. To code a program in C++, it takes 100 man-days. Coding in assembly language ts 10 times harder than coding in C++, but runs 5 times faster. Converting an existing C++ program into an assembly lenguage program is 4 times faster.
To completely write the program in C++ and rewrite the 1% code in assembly language, if a project team needs 13 days, the team consists of
Incremental-Compiler is a compiler
DU-chains(Definition-Use) in compiler design
Which of the following comment about peep-hole optimization is true?
A byte addressable computer has a memory capacity of $$2^m$$ KB( kbytes ) and can perform $$2^n$$ operations. An instruction involving 3 operands and one operator needs maximum of
Any set of Boolean operatorsthat is sufficient to represent all Boolean expressions is said to be complete. Which ofthe following is not complete?
Consider a singly linked list of the form where F is a pointer to the first element in the linked list and is the pointer to the last element in the list. The time of which of the following operations depends on the length of the list?

A particular BNF definition for a “word” is given by the following rules.
<word> :: = <letter> $$\mid$$ <letter><charpair> $$\mid$$ <letter><intpair>
<charpair> :: =<letter><letter> $$\mid$$ <charpair><letter><letter>
<intpair> :: = <integer><integer> $$\mid$$ <intpair><integer><integer>
<letter> :: = a $$\mid$$ b $$\mid$$ c $$\mid$$ .... $$\mid$$ y $$\mid$$ z
<integer> :: = 0 $$\mid$$ 1 $$\mid$$ 2 $$\mid$$ ....$$\mid$$ 9
Which of the following lexical entries can be derived from < word > ?
I. pick
II. picks
III. c44
Avalanche effect in cryptography
In neural network, the network capacity is defined as
Cloaking is a search engine optimization (SEO) technique. During cloaking
What is one advantage of setting up a DMZ(Demilitarized Zone) with two fire walls?
Which one of the following algorithm is not used in asymmetric key cryptography?
Consider the following table in a relational database

According to the data shown in the table, which of the following could be a candidate key of Me table?
A data driven machineis one that executes an instruction if the needed Data is available. The physical ordering of the code listing does not dictate the course of execution. Consider the following pseucdo-code
(A) Multiply E by 0.5 to get F
(B) Add A and B to get E
(C) Add B with 0.5 to get D
(D) Add E and F to get G
(E) Add A with 10.5 to get C
Assume A, B, C are already assigned values and the desired output is G. Which of the following sequence of execution is valid?
Assume A and B are non-zero positive integers. The following code segment
while (A != B){
if (A > B)
A -= B ;
else
B -= A ;
}
count <<A; //printing the volume of A
A language with string manipulation facilities uses the following operations.
head(s)- returns thefirst character of the string s
tail(s) - returns all but the first character of the string s
concat(s1, s2) - concatenatesstring s1 with s2.
The outputof concat(head(s), head(tail(tail(s)))) , where s is acbc is
Choose the correct statement —
CFG (Context Free Grammar)is not closed under

The FSM (Finite State Machine) machine pictured in the figure above
A CFG(Context Free Grammar)is said to be in Chomsky Normal Form (CNF),if all the productions are of the form $$A \rightarrow BC$$ or $$A \rightarrow a$$. Let G be a CFG in CNF. To derive string of terminals of length x, the number of products to be used is
For a database relation R(a,b,c,d) where the domains ofa, b, c and d include only atomic values, only the following functional dependencies and those that can be inferred from them hold
$$a \rightarrow c$$
$$b \rightarrow d$$
The relation is in
Consider the set of relations given below and the SQL query that follows:
Students : ( Roll_number, Name, Date_of_birth )
Courses: (Course_number, Course_name,Instructor)
Grades: (Roll_number, Course_number, Grade)
SELECT DISTINCT Name
FROM Students, Courses, Grades
WHERE Students.Roll_number = Grades.Roll_number
AND Courses.Instructor = Sriram
AND Courses.Course_number = Grades.Course_mummiber
AND Grades.Grade = A
Which ofthe following sets is computed by the above query?
Consider the following C++ program
int a (int m)
{ return ++m; }
int b(int&m)
{ return ++m;}
intc(char &m)
{ return ++m; }
void main ()
{
int p = 0, q = 0,r = 0;
p += a(b(p)) ;
q += b(a(q));
r += a(c(r)) ;
cout<< p << q << r;
}
Assuming the required header files are already included, the above program
A particular parallel program computation requires 100 sec when executed on single processor. If 40% of this computation is inherently sequential (i.e. will not benefit from additional processors), then theoretically best possible elapsed times of this program running with 2 and 4 processors, respectively, are
Consider the following C code segment
int f (int x)
{
if (x < 1) return 1;
else return (f(x - 1) + g(x));
}
int g (int x)
{
if(x < 2) return 2;
else return (f(x - 1) + g(x/2));
}
Of the following, which best describes the growth of f(x) as a function of x ?
For a multi-processor architecture, In which protocol a write transaction is forwarded to only those processorsthat are known to possess a copy of newly altered cache line ?
Given a binary-max heap. The elementsare stored in an arrays 25 25. 14. 16, 13, 10, 8 12. What is the content of the array after two delete operations?
The Functions Point (FP) metric is
The lower degree of cohesion is kind of
What is the outputof the following program?
main(){
int x = 2, y = 5;
if(x < y) return (x = x + y);
else printf("z1");
prinf("z2");
}
The Operating System of a computer may periodically collect all the free memory space to form contiguous block of free space. This is called
Consider the following program
main()
{
int x = 1;
printf("%d",(*char(char*)&x));
}
Assuming required header files are included and if the machine in which this program is executed is littleendian, then the output will be
Consider the following declaration :
structaddr{
char city[10];
char street[30];
int pin ;
};
struct {
char name [30];
int gender ;
struct addr locate ;
}person, *kd = & person;
Then $$*(kd \rightarrow name +2)$$ can be used instead of
If a variable can take only integral values from 0 to n, where n is an integer, then the variable can be represented as a bit-field whose width is ( the log in the answersare to the base 2, and [log n] means the floor of logn )
The following C program
main()
{
fork() ; fork() ; printf("yes");
}
If we execute this core segment, how manytimes the string yes will be printed?
Given $$\sqrt{224_r} = 13_r$$ the value of radix r is
Determine the number of page faults when references to pages occur in the order - 1, 2, 4, 5, 2, 1, 2, 4. Assume that the main memory can accommodate 3 pages and the main memory already has the pages 1 and 2, with page 1 having brought earlier than page 2. (assume LRU algorithm is applied)
Consider a system having m resources of the same type. These resources are started by 3 processes A, B, C, which have peak time demands of 3, 4, 6 respectively. The minimum value of m that ensures that deadlock will never occur is
A computerhas 1000K of main memory. The jobs arrive and finish in the following sequence
Job 1 requiring 200K arrives
Job 2 requiring 350K arrives
Job 3 requiring 300K arrives
Job 1 finishes
Job 4 requiring 120K arrives
Job5 requiring 150K arrives
Job 6 requiring 80K arrives
Among best fit andfirst fit, which performs better for this sequence?
Disk requests cometo a disk driver for cylinders in the order 10, 22, 20, 2, 40, 6 and 38, at a time when the disk drive is reading from cylinder 20. The seek time is 6 ms/cylinder. The total seek time, if the disk arm scheduling algorithms is first-come-first-served is
A has table with 10 buckets with one slot per bucket is depicted here. The symbols, S1 to S7 are initially entered using a hashing function with linear probing. The maximum number of comparisons needed in searching an item that is not present is

The running time of an algorithm is given by
T(n) = T(n-1) + T(n-2) - T(n-3), if n > 3
= n, otherwise
Then what should be the relation between T(1), T(2) and T(3), so that the order of the algorithm is constant ?
The number of edges in a regular graph of degree d and n vertices is
Perform window to viewport transformation for the point (20, 15). Assume that $$(X_{wmin}, Y_{wmin})$$ is (0, 0) ; $$(X_{wmax}, Y_{wmax})$$ is (100, 100); $$(X_{vmin}, Y_{vmin})$$ is (5, 5) ; $$(X_{vmax}, Y_{vmax})$$ is (20, 20). The value of x and y in the viewport is
Given relations R(w,x) and S(y,z), the result of
SELECT DISTINCT w, x
FROM R, S
Is guaranteed to be same as R, if
Immunity of the external schemas (or application programs) to changes im the conceptual schema is referred to as:
The set of attributes X will be fully functionally dependent on the set of attributes Y if the following conditions are satisfied.
Let us assume that transaction T1 has arrived before transaction T2. Consider schedule ?
S=r1(A); r2(B) ; w2(A) ; w1(B)
Which of the following is true?
The time complexity of computingthe transitive closure of binary relation on 2 Set Of m elements S known to be
in multi-programmed systems, it is advantageous if some programs such as editors and compilers can be shared by several users.
Which of the following must be true of multi-programmed systems in order that a single copy of a program can be shared by several users?
I. The program is a macro
II. The program is recursive
III. The program is reentrant
Let P be a procedure that for some inputs calls itself ( i.e. is recursive ). If P is guaranteed to terminate, which of the following statement(s) must br true?
I. Phas local variable
II. Phas an execution path whereit does notcall itself
III. P either refers to a global variable or has at least one parameter
Consider the following C program
#include <stdio.h>
main()
{
float sum = 0.0, j = 1.0, i = 2.0;
while ( i/j > 0.001 ){
j=i+1
sum = sum + i/j;
printf ( “%f\n”, sum);
}
}
How many lines of output does this program produce?
Educational materials for CAT preparation