Computer Science Study Materials for Competitive Exams

Sample Questions, Previous Year Solved Papers, Study Materials For Competitive Examinations Like UGC NET, SET And GATE Computer Science.

Thursday, 24 May 2018

21.       Given the following statements:
S1 : The grammars S→asb | bsa | ss | a and S→asb | bsa | a are not  equivalent.
S2:  The grammars S→ss | sss | asb | bsa | λ and S→ss | asb | bsa | λ are equivalent.
Which of the following is true?
(A) S1 is correct and S2 is not correct.
(B) Both S1 and S2 are correct
(C) S1 is not correct and S2 is correct
(D) Both S1 and S2 are not correct.
Answer: A
22.       What are the final values of Q1 and Q0 after 4 clock cycles, if initial values are 00 in the sequential circuit shown below:
(A) 11
(B) 10
(C) 01
(D) 00
Answer: D
23.       High level knowledge which relates to the use of sentences in different contexts and how the context affect the meaning of the sentences?
(A) Morphological
(B) Syntactic
(C) Semantic
(D) Pragmatic
Answer: D
24.       The objective of .................. procedure is to discover at least one ............... that causes two literals to match.
(A) unification, validation
(B) unification, substitution
(C) substitution, unification
(D) minimax, maximum
Answer: B
25.       If h* represents an estimate of the cost of getting from the current node N to the goal node and h represents actual cost of getting from current node to the goal node, then A* algorithm gives an optimal solution if
(A) h* us equal to h
(B) h* overestimates h
(C) h* underestimates h
(D) none of these
Answer: C
26.       The mean-end analysis process centers around the detection of differences between the current state and the goal state. Once such a difference is isolated, an operator that can reduce the difference must be found. But perhaps that operator cannot be applied to the current state. So a sub-problem of getting to a state in which it can be applied is set up. The kind of backward chaining in which operators are selected and then sub goals are set up to establish the precondition of operators is called
(A) backward planning
(B) goal stack planning
(C) operator subgoaling
(D) operator overloading
Answer: C
27.       In alpha-beta pruning, ............... is used to cut off the search at maximizing level only and ................. is used to cut off the search at minimizing level only.
(A) alpha, beta
(B) beta, alpha
(C) alpha, alpha
(D) beta, beta
Answer: B
28.       If A and B are two fuzzy sets with membership functions
µA(X) = {0.2, 0.5, 0.6, 0.1, 0.9}
µB(X) = {0.1, 0.5, 0.2, 0.7, 0.8}
Then the value of µA∩B will be
(A) {0.2, 0.5, 0.6, 0.7, 0.9}
(B) {0.2, 0.5, 0.2, 0.1, 0.8}
(C) {0.1, 0.5, 0.6, 0.1, 0.8}
(D) {0.1, 0.5, 0.2, 0.1, 0.8}
Answer: D
Explanation:
μA∩B(x) = min [μA(x), μB(x)]
μAᴜB(x) = max [μA(x), μB(x)]
µA’(x) = 1 - µA(x)
29.       The height of h(A) of a fuzzy set A is defined as
h(A) = sup A(x)
                xϵA
Then the fuzzy set A is called normal when
(A) h(A) = 0
(B) h(A) < 0
(C) h(A) = 1
(D) h(A) < 1
Answer: C
30.    An artificial neurons receives n inputs x1, x2,...,xn with weights w1,w2,...,wn attached to the input links. The weighted sum ............... is computed to be passed on to a non-linear filter ϕ called activation function to release the output.
(A) Σ wi                  
(B) Σ xi
(C) Σ wi + Σ xi    
(D) Σ wi . Σ xi
Answer: D
Advertisement

Monday, 14 May 2018

71.       Consider a main memory with 3 page frames for the following page reference string :
5, 4, 3, 2, 1, 4, 3, 5, 4, 3, 4, 1, 4
Assuming that the execution of process is initiated after loading page 5 in memory, the number of page faults in FIFO and second chance replacement respectively are
(A) 8 and 9
(B) 10 and 11
(C) 7 and 9
(D) 9 and 8
Answer: D

72.       Which of the following shell scripts will produce the output “my first script”?
(A) for i in my first script { echo –i $i}
(B) for my first script; do echo –n; done
(C) for i in my first script; do echo –i $i; done
(D) for n in my first script; do echo –i $i; done
Answer: C
73.       The portion of Windows 2000 operating system which is not portable is
(A) processor management
(B) user interface
(C) device management
(D) virtual memory management
Answer: D
74.       Match the following for Windows Operating System :
List - I
(a) Hardware abstraction layer
(b) Kernel
(c) Executive
(d) Win32 subsystem
List - II
(i) Starting all processes, emulation of different operating systems, security functions,
transform character based applications to graphical representation.
(ii) Export a virtual memory interface, support for symmetric multiprocessing,
administration, details of mapping memory, configuring I/O buses, setting up DMA.
(iii) Thread scheduling, interrupt and exception handling, recovery after power failure.
(iv) Object manager, virtual memory manager, process manager, plug and-play and
power manager.
Codes :
      (a)   (b)  (c)  (d)
(A) (i)    (iii)  (ii)  (iv)
(B) (iv)  (iii)  (ii)   (i)
(C) (ii)  (iii)   (iv)  (i)
(D) (iii)  (ii)   (i)   (iv)
Answer: C
75.       Which of the following statements is not true for UNIX Operating System?
(A) Major strength of UNIX Operating System is its open standards which enabled large number of organizations ranging from academicia to industries to participate in its development.
(B) UNIX kernel uses modules with well specified interfaces and provides advantages like simplified testing and maintenance of kernel. It has better extensibility as the kernel is not monolithic.
(C) UNIX is kernel based operating system with two main components viz. process management subsystem and file management subsystem.
(D) All devices are represented as files which simplify the management of I/O devices and files. The directories structure used is directed acyclic graph.
Answer: B


Sunday, 13 May 2018

61.       Which of the following is/are fundamental method(s) of antialiasing?
(i) Increase of sample rate.
(ii) Treating a pixel as a finite area rather than as a point.
(iii) Decrease of sample rate.
(A) (i) and (ii)
(B) (ii) and (iii)
(C) (i) only
(D) (ii) only
Answer: A
62.       The two color systems – the HSV and HLS are
(A) Hue, Saturation, Value and Hue, Lightness, Saturation.
(B) High, Standard, Value and High, Lightness, Saturation.
(C) Highly, Saturated, Value and Highly, Lightened, Saturation.
(D) Highly, Standard, Value and Hue, Lightness, Saturation.
Answer: A
63.       The parametric representation of the line segment between the position vectors P1(2, 3) and P2(5, 4) is given as
(A) x(t)= 2+7t, y(t) = 3+7t         0 ≤ t ≤
(B) x(t)=2+10t, y(t) = 3+12t      0 ≤ t ≤ 1
(C) x(t)= 2+3t, y(t)=3+t             0 ≤ t ≤ 1
(D) t(x, y) = 14t              0 ≤ t ≤ 1
Answer: C
64.       Consider the following transformation matrix for rotation(clockwise) :
This matrix rotates an object by an angle θ about :
(A) X-axis
(B) Y-axis
(C) Z-axis
(D) All of the above
Answer: C
65.       Consider the following sequence of operations :
(i) Pointer p1 is set to point at a new heap-dynamic variable.
(ii) Pointer p2 is assigned p1’s value.
(iii) The heap dynamic variable pointed to by p1 is explicitly de-allocated, but p2 is not changed by the operation.
This situation leads to which of the following :
(A) p1 becomes a dangling pointer
(B) p2 becomes a dangling pointer
(C) Both p1 and p2 are now dangling pointers
(D) Neither p1 nor p2 is now a dangling pointer
Answer: B

66.       The programming languages C and C++ are not strongly typed languages because :
(A) Both C and C++ allow functions for which parameters are not type checked.
(B) Both C and C++ allow functions for which parameters are type checked.
(C) Both C and C++ allow functions for which parameters are not type checked and also the union types in these languages are not type checked.
(D) Union types in these (C and C++) languages are not type checked.
Answer: C
67.       The tracing model in Prolog describes program execution in terms of certain events. These events are
(A) call and exit
(B) call and fail
(C) call, exit and redo
(D) call, exit, redo and fail
Answer: D
68.       Which of the following statements is not correct with reference to distributed systems?
(A) Distributed system represents a global view of the network and considers it as a virtual uni-processor system by controlling and managing resources across the network on all the sites.
(B) Distributed system is built on bare machine, not an add-on to the existing software.
(C) In a distributed system, kernel provides smallest possible set of services on which other services are built. This kernel is called microkernel. Open servers provide other services and access to shared resources.
(D) In a distributed system, if a user wants to run the program on other nodes or share the resources on remote sites due to their beneficial aspects, user has to log on to that site.
Answer: D
69.       A system contains 10 units of resource of same type. The resource requirement and current allocation of these resources for three processes P, Q and R are as follows :
Now, consider the following resource requests :
(i) P makes a request for 2 resource units.
(ii) Q makes request for 2 resources units.
(iii) R makes a request of 2 resource units.
For a safe state, which of the following options must be satisfied?
(A) Only request (i)
(B) Only request (ii)
(C) Only request (iii)
(D) Request (i) and (ii)
Answer: C
70.    Consider the following set of processes with the length of CPU burst time in milliseconds (ms) :
Assume that processes are stored in ready queue in following order :
A – B – C – D – E
Using round robin scheduling with time slice of 1 ms, the average turn around time is
(A) 8.4 ms
(B) 12.4 ms
(C) 9.2 ms
(D) 9.4 ms
Answer: A


Saturday, 12 May 2018

51.       Consider the following two function declarations :
(i) int *f( ) (ii) int (*f)( )
Which of the following is true?
(A) Both are identical.
(B) The first is a correct declaration and the second is wrong.
(C) Both are different ways of declaring pointer to a function.
(D) The first declaration is a function returning a pointer to an integer and the second is a pointer to function returning integer.
Answer: D
52.       Assume that we have constructor function for both Base and Derived classes. Now consider the declaration :
main ( )
Base *p = new Derived;
In what sequence, the constructor will be executed?
(A) Derived class constructor is followed by Base class constructor.
(B) Base class constructor is followed by Derived class constructor.
(C) Base class constructor is never called.
(D) Derived class constructor is never called.
Answer: B
53.       What is the output of the following program?
#include<stdio.h>
main( )
{
int a, b = 0;
static int c[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
for (a=0; a<10;++a);
if ((c[a]%2)= =0) b+=c[a];
printf(“%d”,b);
}
(A) 15
(B) 25
(C) 45
(D) 20
Answer: D
54.       A Program contains the following declarations and initial assignments
int i = 8, j = 5;
double x = 0.005, y = –0.01;
char c=’c’, d=’d’;
Determine the value of the following expressions which involve the use of library functions:
abs(i-2*j) ; log(exp(x)) ; toupper(d)
(A) 2; 0.005; D
(B) 1; 0.005; D
(C) 2; 0.005; E
(D) 1; 0.005; e
Answer: A
55.       MPEG involves both spatial compression and temporal compression. The spatial compression is similar to JPEG and temporal compression removes .............. frames.
(A) Temporal
(B) Voice
(C) Spatial
(D) Redundant
Answer: D

56.       If the data unit is 111111 and the divisor is 1010. In CRC method, what is the dividend at the transmission before division?
(A) 1111110000
(B) 1111111010
(C) 111111000
(D) 111111
Answer: C
57.       If user A wants to send an encrypted message to user B. The plain text of A is encrypted with the .................
(A) Public Key of user A        
(B) Public Key of user B
(C) Private Key of user A      
(D) Private Key of user B
Answer: B
58.       A ............... can forward or block packets based on the information in the network layer and transport layer header.
(A) Proxy firewall                    
(B) Firewall
(C) Packet filter firewall         
(D) Message digest firewall
Answer: A
59.       Which of the following graphics devices are known as active graphics devices?
(i) Alphanumeric devices
(ii) Thumb wheels
(iii) Digitizers
(iv) Joystics
(A) (i) and (ii)
(B) (iii) and (iv)
(C) (i), (ii) and (iii)
(D) (i), (ii), (iii) and (iv)
Answer: D
60.    A diametric projection is said to be trimetric projection when
(i) two of the three foreshortening factors are equal and third is arbitrary.
(ii) all of the three foreshortening factors are equal.
(iii) all of the three foreshortening factors are arbitrary.
Which of the above is true?
(A) (i) and (ii)
(B) (ii) and (iii)
(C) (i) only
(D) (iii) only
Answer: C