Thursday, 8 November 2018

NTA UGC NET Computer Science Solved Paper 2 January 2017

1. Consider a sequence F00 defined as : F00(0) = 1, F00(1) = 1 F00(n) = 10 ∗ F00(n – 1) + 100F00(n – 2) for n ≥ 2 Then what shall be the set of values of the sequence F00 ?
(1) (1, 110, 1200)
(2) (1, 110, 600, 1200)
(3) (1, 2, 55, 110, 600, 1200)
(4) (1, 55, 110, 600, 1200)


2. Match the following :
List-I List-II
a. Absurd i. Clearly impossible being contrary to some evident truth.
b. Ambiguous ii. Capable of more than one interpretation or meaning.
c. Axiom iii. An assertion that is accepted and used without a proof.
d. Conjecture iv. An opinion Preferably based on some experience or wisdom.
Codes:
a b c d
1.i ii iii iv
2.i iii iv ii
3.ii iii iv i
4.ii i iii iv
(1) (1)
(2) (2)
(3) (3)
(4) (4)


3. The functions mapping R into R are defined as : f(x) = x3 – 4x, g(x) = 1/(x2 + 1) and h(x) = x4. Then find the value of the following composite functions : hog(x) and hogof(x)
(1) (x2 + 1)4 and [(x3 – 4x)2 + 1]4
(2) (x2 + 1)4 and [(x3 – 4x)2 + 1]-4
(3) (x2 + 1)-4 and [(x3 – 4x)2 + 1]4
(4) (x2 + 1)-4 and [(x3 – 4x)2 + 1]-4


4. How many multiples of 6 are there between the following pairs of numbers ? 0 and 100 and –6 and 34
(1) 16 and 6
(2) 17 and 6
(3) 17 and 7
(4) 16 and 7


5. Consider a Hamiltonian Graph G with no loops or parallel edges and with |V(G)| = n ≥ 3. Then which of the following is true ?
(1) deg(v) ≥n/2 for each vertex v.
(2) |E(G)| ≥1/2(n – 1) (n – 2) + 2
(3) deg (v) + deg(w) ≥ n whenever v and w are not connected by an edge
(4) All of the above


6. In propositional logic if (P → Q) ∧ (R → S) and (P ∨ R) are two premises such that
(P → Q) ∧ (R → S)
P ∨ R
Y

Y is the premise :
(1) P ∨ R
(2) P ∨ S
(3) Q ∨ R
(4) Q ∨ S


7. ECL is the fastest of all logic families. High speed in ECL is possible because transistors are used in difference amplifier configuration, in which they are never driven into ____.
(1) Race condition
(2) Saturation
(3) Delay
(4) High impedance


8. A binary 3-bit down counter uses J-K flip-flops, FFi with inputs Ji, Ki and outputs Qi, i = 0, 1, 2 respectively. The minimized expression for the input from following, is
I.J0=K0=0
II.J0=K0=1
III.J1=K1=Q0
IV.J1=K1=Q'0
V.J2=K2=Q1Q0
Vl.J2=K2=Q'1Q'0
(1) I, III, V
(2) I, IV, VI
(3) II, III, V
(4) II, IV, VI


9. Convert the octal number 0.4051 into its equivalent decimal number.
(1) 0.5100098
(2) 0.2096
(3) 0.52
(4) 0.4192


10. The hexadecimal equivalent of the octal number 2357 is :
(1) 2EE
(2) 2FF
(3) 4EF
(4) 4FE


11. Which of the following cannot be passed to a function in C++ ?
(1) Constant
(2) Structure
(3) Array
(4) Header file


12. Which one of the following is correct for overloaded functions in C++ ?
(1) Compiler sets up a separate function for every definition of function.
(2) Compiler does not set up a separate function for every definition of function.
(3) Overloaded functions cannot handle different types of objects.
(4) Overloaded functions cannot have same number of arguments.


13. Which of the following storage classes have global visibility in C/C++ ?
(1) Auto
(2) Extern
(3) Static
(4) Register


14. Which of the following operators cannot be overloaded in C/C++ ?
(1) Bitwise right shift assignment
(2) Address of
(3) Indirection
(4) Structure reference


15. If X is a binary number which is power of 2, then the value of X & (X – 1) is :
(1) 11….11
(2) 00…..00
(3) 100…..0
(4) 000……1


16. An attribute A of datatype varchar (20) has value ‘Ram’ and the attribute B of datatype char (20) has value ‘Sita’ in oracle. The attribute A has _______ memory spaces and B has _______ memory spaces.
(1) 20,20
(2) 3,20
(3) 3,4
(4) 20,4


17. Integrity constraints ensure that changes made to the database by authorized users do not result into loss of data consistency. Which of the following statement(s) is (are) true w.r.t. the examples of integrity constraints ?
(A) An instructor Id. No. cannot be null, provided Intructor Id No. being primary key.
(B) No two citizens have same Adhar-Id.
(C) Budget of a company must be zero.

(1) (A), (B) and (C) are true.
(2) (A) false, (B) and (C) are true.
(3) (A) and (B) are true; (C) false.
(4) (A), (B) and (C) are false


18. Let M and N be two entities in an E-R diagram with simple single value attributes. R1 and R2 are two relationship between M and N, where as R1 is one-to-many and R2 is many-to-many. The minimum number of tables required to represent M, N, R1 and R2 in the relational model are _______.
(1) 4
(2) 6
(3) 7
(4) 3


19. Consider a schema R(MNPQ) and functional dependencies M → N, P → Q. Then the decomposition of R into R1 (MN) and R2(PQ) is________.
(1) Dependency preserving but not lossless join
(2) Dependency preserving and lossless join
(3) Lossless join but not dependency preserving
(4) Neither dependency preserving nor lossless join.


20. The order of a leaf node in a B+ tree is the maximum number of children it can have. Suppose that block size is 1 kilobytes, the child pointer takes 7 bytes long and search field value takes 14 bytes long. The order of the leaf node is ________.
(1) 16
(2) 63
(3) 64
(4) 68


21. Which of the following is true for computation time in insertion, deletion and finding maximum and minimum element in a sorted array ?
(1) Insertion – 0(1), Deletion – 0(1), Maximum – 0(1), Minimum – 0(l)
(2) Insertion – 0(1), Deletion – 0(1), Maximum – 0(n), Minimum – 0(n)
(3) Insertion – 0(n), Deletion – 0(n), Maximum – 0(1), Minimum – 0(1)
(4) Insertion – 0(n), Deletion – 0(n), Maximum – 0(n), Minimum – 0(n)


22. The seven elements A, B, C, D, E, F and G are pushed onto a stack in reverse order, i.e., starting from G. The stack is popped five times and each element is inserted into a queue.Two elements are deleted from the queue and pushed back onto the stack. Now, one element is popped from the stack. The popped item is ________.
(1) A
(2) B
(3) F
(4) G


23. Which of the following is a valid heap ? (A) (B) (C) (D)
(1) A
(2) B
(3) C
(4) D


24. If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m, where n ≤ m, the expected number of collisions involving a particular key x is less than _______.
(1) 1
(2) 1/n
(3) 1/m
(4) n/m


25. Which of the following statements is false ?
(A) Optimal binary search tree construction can be performed efficiently using dynamic programming.
(B) Breadth-first search cannot be used to find connected components of a graph.
(C) Given the prefix and postfix walks of a binary tree, the tree cannot be re-constructed uniquely.
(D) Depth-first-search can be used to find the connected components of a graph.
(1) A
(2) B
(3) C
(4) D


26. Match the following Layers and Protocols for a user browsing with SSL :
a. Application of layeri. TCP
b. Transport layerii. IP
c. Network layeriii. PPP
d. Datalink layeriv. HTTP

Codes:
** a b c d
(1) iv i ii iii
(2)iii ii i iv
(3)ii iii iv i
(4)iii i iv ii
(1) (1)
(2) (2)
(3) (3)
(4) (4)


27. The maximum size of the data that the application layer can pass on to the TCP layer below is __________.
(A) 216 bytes
(B) 216 bytes + TCP header length
(C) 216 bytes - TCP header length
(D) 215 byte.
(1) (1), (2) and (4)
(2) (2) and (4)
(3) (2), (3) and (4)
(4) All option are correct.


28. A packet whose destination is outside the local TCP/IP network segment is sent to _____.
(1) File server
(2) DNS server
(3) DHCP server
(4) Default gateway


29. Distance vector routing algorithm is a dynamic routing algorithm. The routing tables in distance vector routing algorithm are updated _____.
(1) automatically
(2) by server
(3) by exchanging information with neighbour nodes
(4) with back up database


30. In link state routing algorithm after construction of link state packets, new routes are computed using:
(1) DES algorithm
(2) Dijkstra’s algorithm
(3) RSA algorithm
(4) Packets


31. Which of the following strings would match the regular expression : p+ [3 – 5]∗ [xyz]?
I. p443y
II. p6y
III. 3xyz
IV. p35z
V. p353535x
VI. ppp5
(1) I, III and VI only
(2) IV, V and VI only
(3) II, IV and V only
(4) I, IV and V only


32. Consider the following assembly language instructions :
mov al,15
mov ah,15
xor al,al
mov cl, 3
shr ax,cl
add al,90H
adc ah,0
What is the value in ax register after execution of above instructions?
(1) 0270H
(2) 0170H
(3) 01E0H
(4) 0370H


33. Consider the following statements related to compiler construction :
I. Lexical Analysis is specified by context-free grammars and implemented by pushdown automata.
II. Syntax Analysis is specified by regular expressions and implemented by finite-state machine.
Which of the above statement(s) is/are correct ?
(1) Only I
(2) Only II
(3) Both I and II
(4) Neither I nor II


34. The contents of Register (BL) and Register (AL) of 8085 microprocessor are 49H and 3AH respectively. The contents of AL, the status of carry flag (CF) and sign flag (SF) after executing ‘SUB AL, BL’ assembly language instruction, are
(1) AL = 0FH; CF = 1; SF = 1
(2) AL = F0H; CF = 0; SF = 0
(3) AL = F1H; CF = 1; SF = 1
(4) AL = 1FH; CF = 1; SF = 1


35. Which of the following statement(s) regarding a linker software is/are true ?
I A function of a linker is to combine several object modules into a single load module.
II A function of a linker is to replace absolute references in an object module by symbolic references to locations in other modules.
(1) Only I
(2) Only II
(3) Both I and II
(4) Neither I nor II


36. There are three processes P1, P2 and P3 sharing a semaphore for synchronizing a variable. Initial value of semaphore is one. Assume that negative value of semaphore tells us how many processes are waiting in queue.
Processes access the semaphore in following order :
(a) P2 needs to access
(b) P1 needs to access
(c) P3 needs to access
(d) P2 exits critical section
(e) P1 exits critical section
The final value of semaphore will be :
(1) 0
(2) 1
(3) -1
(4) -2


37. In a paging system, it takes 30 ns to search translation Look-a-side Buffer (TLB) and 90 ns to access the main memory. If the TLB hit ratio is 70%, the effective memory access time is :
(1) 48ns
(2) 147ns
(3) 120ns
(4) 84ns


38. Match the following w.r.t. Input/Output management
a. Device controlleri. Extracts information from the controller register and store it in data buffer
b. Device driverii. I/O scheduling
c. Interrupt handleriii. Performs data transfer
d. Kernel I/O subsystemiv. Processing of I/O request
Codes:
** a b c d
(1) iii iv i ii
(2)ii i iv iii
(3)iv i ii iii
(4)i iii iv ii
(1) (1)
(2) (2)
(3) (3)
(4) (4)


39. Which of the following scheduling algorithms may cause starvation ?
a. First-come-first-served
b. Round Robin
c. Priority
d. Shortest process next
e. Shortest remaining time first
(1) a, c and e
(2) c, d and e
(3) b, d and e
(4) b, c and d


40. Distributed operating systems consist of:
(1) Loosely coupled O.S. software on a loosely coupled hardware.
(2) Loosely coupled O.S. software on a tightly coupled hardware.
(3) Tightly coupled O.S. software on a loosely coupled hardware.
(4) Tightly coupled O.S. software on a tightly coupled hardware.


41. Software Engineering is an engineering discipline that is concerned with:
(1) how computer systems work.
(2) theories and methods that underlie computers and software systems.
(3) all aspects of software production
(4) all aspects of computer-based systems development, including hardware, software and process engineering.


42. Which of the following is not one of three software product aspects addressed by McCall’s software quality factors ?
(1) Ability to undergo change
(2) Adaptiability to new environments
(3) Operational characteristics
(4) Production costs and scheduling


43. Which of the following statement(s) is/are true with respect to software architecture ?
S1 : Coupling is a measure of how well the things grouped together in a module belong together logically.
S2 : Cohesion is a measure of the degree of interaction between software modules.
S3 : If coupling is low and cohesion is high then it is easier to change one module without affecting others.
(1) Only S1 and S2
(2) Only S3
(3) All of S1, S2 and S3
(4) Only S1


44. The prototyping model of software development is:
(1) a reasonable approach when requirements are well-defined
(2) a useful approach when a customer cannot define requirements clearly.
(3) the best approach to use for projects with large development teams.
(4) a risky model that rarely produces a meaningful product.


45. A software design pattern used to enhance the functionality of an object at run-time is:
(1) Adapter
(2) Decorator
(3) Delegation
(4) Proxy


46. Match the following:
List – IList – II
a. Affiliate Marketingi. Vendors ask partners to place logos on partner’s site. If customers click, come to vendors and buy.
b. Viral Marketingii. Spread your brand on the net by word of-mouth. Receivers will send your information to their friends.
c. Group Purchasingiii. Aggregating the demands of small buyers to get a large volume. Then negotiate a price.
d. Bartering Online iv. Exchanging surplus products and services with the process administered completely online by an intermediary. Company receives “points” for its contribution.
Codes:
** a b c d
(1) i ii iii iv
(2)i iii ii iv
(3)iii ii iv i
(4)ii iii i iv
(1) (1)
(2) (2)
(3) (3)
(4) (4)


47. ________ refers loosely to the process of semi-automatically analyzing large databases to find useful patterns.
(1) Datamining
(2) Data warehousing
(3) DBMS
(4) Data mirroring


48. Which of the following is/are true w.r.t. applications of mobile computing ?
(A) Travelling of salesman
(B) Location awareness services
(1) (A) true; (B) false.
(2) Both (A) and (B) are true.
(3) Both (A) and (B) are false.
(4) (A) false; (B) true.


49. In 3G network, W-CDMA is also known as UMTS. The minimum spectrum allocation required for W-CDMA is _______.
(1) 2 MHz
(2) 20 KHz
(3) 5 KHz
(4) 5 MHz


50. Which of the following statements is/are true w.r.t. Enterprise Resource Planning (ERP) ?
(A) ERP automates and integrates majority of business processes.
(B) ERP provides access to information in a Real Time Environment.
(C) ERP is inexpensive to implement
(1) (A), (B) and (C) are false.
(2) (A) and (B) false; (C) true.
(3) (A) and (B) true; (C) false.
(4) (A) true ; (B) and (C) are false.


Sunday, 14 October 2018

Computer Networks, Question-26, UGC NET CS 2015 Jun (Set-3)

Which one of the following control fields in TCP header is used 
to specify whether the sender has no more data to transmit?

(A) FIN
(B) RST
(C) SYN
(D) PSH

Friday, 28 September 2018

isro cs question paper solution 2018 Q51 Set-A

Which of the following is dense index ?

(a) Primary index
(b) Clusters Index
(c) Secondary index
(d) Secondary non key index


Tuesday, 21 August 2018

Discrete mathematics | Graph theory basics notes and Tutorial

Graph :
Definition- 
It is a triple consisting of a vertex set V(G), an edge set E(G) and a relation that associates with each edge and two vertices (not necessarily distinct) called its end points. Basic types of graphs are directed and undirected graphs.
To understand difference between walk, path, trail, cycle and circuit, its needed to define walk trail path cycle and circuit of a graph with example.

Walk : Vertices may repeat. Edges may repeat (Closed or Open). Here, You can take any edge and vertices combination to find the walk in graph. There are two types open walk  and closed walk in graph theory.
Lets take some example in above graph.
Example 1: A-B-I-J-I-C-D is open walk. (repeated vertices are I, repeated edges are I-J (or J-I)).
Example 2: A-B-I-J-D-C-I-G-A is closed walk as start and end vertices are same. (repeated vertices except start and end vertices are I, no repeated edges).

Trails: Vertices may repeat. Edges cannot repeat (Open)
Example 1: A-B-I-C-D-J-I-G is trail example in given graph.(repeated vertices are I, no repeated edges).

Path : Vertices cannot repeat. Edges cannot repeat (Open)
A-B-I-J-D-C is a path example.
A-B-C-I-J-D-H-E-F-G is Hamiltonian path example.(each vertex visited exactly once in this path)

Circuit : Vertices may repeat. Edges cannot repeat (Closed).

Cycle : Vertices cannot repeat except that the initial vertex is the terminal vertex. Edges cannot repeat (Closed)

Connected graphs: A graph is a connected graph if selected any two vertices Vi, Vj from set V(G), there is a path from Vi to Vj. So, Every vertex is reachable from every other vertex in V(G) by some path. We see example of the connected graph both in directed and undirected graph.

Example connected directed graph: In below figure first graph is disconnected directed graph with no path from B to D. After adding the directed edge B to D graph become connected. Now, every vertex is reachable to other vertex.
Disconnected graph
Connected Graph
Regular graphs: A graph is a regular graph if its every vertex has the same degree (or valency). A graph has every vertices of degree k, such regular graph is called k-regular graph.
Example:
A 0-regular graphs are graphs with each vertices having degree 0, then such graph have all disconnected vertices.
A 1-regular graphs are graphs with each vertices having degree 1, then such graph consists of disconnected edges therefore no of vertices in graph is even.
A 2-regular graphs are graphs with each vertices having degree 2, then such graph disjoint union of the cycles.

Every complete graph Km is k-regular.

Bipartite graphs:
A simple graph G = (V, E) with two disjoint and independent sets V = {V1, V2} is called a bipartite graph if every edge of E joins a vertex in V1 to a vertex in V2.
There is no edge among vertices of same set(V1 or V2).
Bipartate graph doesn't have any odd length cycles.

Bipertite graph has two sets disjoint and independent sets of vertices, let us say, V1 and V2, and if an edge is drawn, it should connect any vertex in set V1 to any vertex in set V2.


Tree and rooted tree:
A tree is a connected graph without cycles.
A rooted tree T is a connected acyclic graph with one vertex is specified as the root of the tree.
Path to every vertex originates directly or indirectly from the root vertex.
The level of a vertex from the root defined as the number of edges in the shortest walk between vertex and the root.
It is assumed that root node is at Level-0 for the rooted tree.
The vertex directly connected to the root vertex is at Level-1.

Spanning trees:
A spanning tree T is tree which is subgraph of an undirected connected graph G, which includes all of the vertices connected with minimal set of edges.

Eccentricity of a vertex:
The eccentricity of vertex e(V) is the greatest of the distances between a vertex V to all other vertices.

Diameter of a graph:
Diameter of the Graph G is maximum of eccentricities of the vertices in a graph.The maximum among all the distances between a any vertex to all other vertices.
The diameter of a connected graph is the largest distance between pairs of vertices of the graph.

Radius of a graph:
Radius of the Graph G is minimum of eccentricities of the vertices in a graph.

Centres of a tree:
In a tree, a vertex with minimal eccentricity is called center.
There are two types of the tree based on center.
A tree is called central tree if a tree has only one center and tree with two centers is Bi-centered tree.

Central Graphs:

Hamiltonian Path is a path which visits every vertex in a given graph exactly once.
Hamiltonian Circuit is a Hamiltonian path which starts and ends on the same vertex.   
A graph which contains a Hamiltonian cycle is called a Hamiltonian graph.
Non-Hamiltonian Graph
Hamiltonian Path: 3-1-4-2-5  
Hamiltonian Graph
Hamiltonian Circuit: 3-1-5-2-4-3
Eulerian Path is a path or trail which visits every edge in a given graph exactly once.
Eulerian Circuit is a Eulerian path which starts and ends on the same vertex.
Eulerian graphs: A graph which contains the Eulerian circuit is called the Euler/Eulerian graph.
A graph contains the Eulerian circuit if and only if every vertex has even degree and all non-zero degree vertices belongs to one connected component.

Eulerian Graph
Eulerian Circuit: 2-0-1-2-4-3-2
All vertices has even degree.
Non-Eulerian Graph
Eulerian path:2 -1 -0 -2 - 3 -5 -4 -3
Vertices 2 and 3 has odd degree

Planar graphs is a graph which can be drawn on a plane such that no edges in graph intersect each other.
Above complete graph K4, is Planar graph
as it can be drawn on the plane as above
Above complete graph K5 is non-planar graph
as it cannot be drawn on plane without intersection of edges.
Here, when we try to draw edge (2-4), it intersects with edge (0-3) or edge (1-3)


Tuesday, 31 July 2018

UGC NET July 2018 result released,Check Result at cbsenet.nic.in.

Steps to check UGC NET July 2018 result and and revised answer key?

The Central Board of Secondary Education  had conducted the UGC NET 2018 on July 8 (Sunday) and re-exam on July 22, declared the CBSE UGC-NET 2018 result today evening. Candidates who will clear the paper will be eligible for a JRF or can apply for the post of assistant professors. This year, there were only 2 papers for the first time. paper 1 is about research aptitude and paper 2 is subject specific. Total of 11.48 lakh candidates took the eligibility test in 84 different subjects this year. All the eligible candidates who had appeared for the UFC NET exam can check the results at cbsenet.nic.in. Here's the direct link of the result -
http://cbseresults.nic.in/UGCpxy/net_july2018.htm

Login with your Application number, your Roll Number and DoB  -



















Your marks in UGC NET 2018 with the respective percentage will be shown.

You provided with link for the  UGC NET CUT-OFF . 


Revised answer keys after verification of challenges -July 2018


Detail page for result of CBSE-UGC NET RESULT - July 2018 with
candidate details, Obtained marks, Total marks and percentages, Remarks, Subject-wise/category-wise cut off for Assistant Professor and JRF for UGC NET 2018. Remarks marks qualification in CBSE UGC NET 2018 for for Assistant Professor.

  

Thursday, 26 July 2018

UGC NET July 2018:Answer key released,Check at cbsenet.nic.in

Steps to check UGC NET July 2018 Answer Key and Your Recorded Response?

Step 1 – Visit the official website and login wit your Application number, your DoB and Security pin provided -
https://jeemain.nic.in/cbsenet/keychallange/Login.aspx

After login you can see buttons:

View Recorded Response - To view your answers
View Answer Keys - To view the official answer key
Challenge Response - A call to prove or justify your response.
Challenge Answer Keys -A call to prove or justify Answer keys.

You can also find the link on the same page for image of your OMRs. 
Click Here To View Images of OMR Sheet

You will be shown page like below after successful Login:



1) View Answer Keys:
After clicking VIEW ANSWER KEYS button, you will be redirected to page where you have to select following options for UGC NET paper 1:

Select Question Paper (Examination Date) : -date of your UGC NET paper I
Select Subject : - Not Applicable (General paper)
Book No : - booklet No. for your UGC NET paper I

After submitting the above data you will be shown the answer keys for the selected Booklet No.



Tuesday, 10 July 2018

NTA UGC-NET Computer Science November 2017 Solved Questions Paper-2

The NTA UGC-NET November, 2017 Examination was conducted on 5th November by CBSE( Central Board of Secondary Education). The following are the answer keys of Test Booklet Series B, Paper-1 of UGC NET / CBSE NET held on 5th November, 2017. The answer keys are as per the answer keys released by CBSE on behalf of UGC. It is to be noted that the UGC NET Examination 2017 June and 2017 December was not held. You can also Download PDF of solved computer science nta ugc-net previous year question paper with answer key from below links.

  Question paper NTA NET Computer Science Paper 2 Nov 2017: Download Free PDF Now

Question paper with Answer key NTA NET Computer Science Paper 2 Nov 2017: Download Free PDF Now

1. If the time is now 4 O’clock, what will be the time after 101 hours from now ?
(1) 9 O’clock
(2) 8 O’clock
(3) 5 O’clock
(4) 4 O’clock

Answer is: (1) 9 O’clock
101 / 24 = = 96 + 5 = reminder 5 => after 96 hour it would be 4 O’clock and then after 5 hour,
it's 9 O'clock

2. Let m=(313)4 and n=(322)4. Find the base 4 expansion of m+n.
(1) (635)4
(2) (32312)4
(3) (21323)4
(4) (1301)4

Answer is: (4) (1301)4
m+n
(313)4 + (322)4
( _ _ 5)4 =>4 (here add unit's digit, we get 5 >= 4 , so carry 1, (so one is added to the ten's digit))
( _ 41)4=> ( _ 0 1)4 (here, we sum ten's digits => (2+1+1 (carry 1 from unit's digit sum))) =4 >=4. so, carry 1 will be passed to hundreds digit.
( 7 4 1)4=> ( 3 0 1)4(here, we sum hundreds digits => (3+3+1 (carry 1 from tens digit sum))) =7 >=4. so, carry 1 will be passed to thousands digit. so, finally (1 3 0 1)4

3. 
Find the boolean product A⊙B of the two matrices.

(A) (1) (B) (2) (C) (3) (D) (4)
Answer is: (A) (1)

4. How many distinguishable permutations of the letters in the word BANANA are there ?

(1) 720
(2) 120
(3) 60
(4) 36

Answer is: (3) 60
Total permutation with 6 words are 720
A is repeated 3 times and N is repeated 2 times.
Permutations of 3 A's are 3!
Permutations of 3 N's are 2!
So, divide the total 720 permutations by 2! and 3!, gives answer 60 permutations.

5. Consider the graph given below :

Use Kruskal’s algorithm to find a minimal spanning tree for the graph. The List of the edges of the tree in the order in which they are choosen is ?
(1) AD, AE, AG, GC, GB, BF
(2) GC, GB, BF, GA, AD, AE
(3) GC, AD, GB, GA, BF, AE
(4) AD, AG, GC, AE, GB, BF

Kruskal's algorithm is a MST(minimum-spanning-tree) algo., which finds an edge with the least possible edge weight that combines any two trees in the forest (initially all vertex are considered as separate tree). Kruskal's algorithm follows the greedy algorithm approach in graph theory as it finds a MST for a connected weighted graph adding increasing cost edges at each step (Such that graph doen't form a cycle).
Sorted edges by weight
Edge  weight
AD       2
GC       2
GB       3
GA       3
BC       4
BF       4
DG      4
AE      4
ED      5
CF      5
AC     6
DB   weight not given
So, the bold edges above will form a MST of graph in the order of increasing edge weight.

6. The Boolean function with the Karnaugh map is :

(1) (A+C).D+B
(2) (A+B).C+D
(3) (A+D).C+B
(4) (A+C).B+D

Answer is: (1) (A+C).D+B

7. The Octal equivalent of the binary number 1011101011 is :
(1) 7353
(2) 1353
(3) 5651
(4) 5657

Answer is: (2) 1353
Group the three bits from the right side (from LSB) and convert to equivalent decimal.

8. Let P and Q be two propositions, ¬ (P ↔ Q) is equivalent to :
(1) P ↔ ¬ Q
(2) ¬ P ↔ Q
(3) ¬ P ↔ ¬ Q
(4) Q → P

Answer is: (1) P ↔ ¬ Q

9. Negation of the proposition ∃ x H(x) is :
(1) ∃x ¬ H(x)
(2) ∀ x ¬ H(x)
(3) ∀ x H(x)
(4) ¬ x H(x)


Ans is: (2) ∀ x ¬ H(x)
Negation of (∃ x H(x)) = ¬ ∃ x H(x) = ∀ x ¬ H(x)(as negation symbol moves from left to right it changes the symbol ∃ to ∀).

10. The output of the following combinational circuit is F.

The value of F is :
(1) P1 + P2' P3
(2) P1 + P2' P3'
(3)P1 + P2 P3'
(4)P1'+ P2 P3

Correct answer is : (2) P1+P2'P3' outputs of OR gates are:
(P1+P2'+P3'(P1+P2'+P3(P1+P2+P3')
= (P1+P1P2'+P1P3+P2'+P2'P3+P3'P1+P3'P2+0) . (P1+P2+P3')
=(P1+P1P2'+P1P3+P3'P1+P2'+P2'P3+P3'P2. (P1+P2+P3'
(P1+P2'. (P1+P2+P3'
=(P1+P1P2+P1P3'+P2'P1+0+P2'P3')
=(P1+P2'P3')

11. ‘ptrdata’ is a pointer to a data type. The expression *ptrdata++ is evaluated as (in C++) :
(1) *(ptrdata++)
(2) (*ptrdata)++
(3) *(ptrdata)++
(4) Depends on compiler

Answer is: (1) *(ptrdata++)
as the ++ has higher precedence than * operator.

12. The associativity of which of the following operators is Left to Right, in C++ ?
(1) Unary Operator
(2) Logical not
(3) Array element access
(4) addressof

Answer is: (3) Array element access
Unary Operator -- right to left associativity
Logical not -- right to left associativity
Array element access -- Array subscript - [ ] - Left to Right associativity addressof -- right to left associativity

13. A member function can always access the data in __________ , (in C++).
(1) the class of which it is member
(2) the object of which it is a member
(3) the public part of its class
(4) the private part of its class

Correct Answer is: (1) the class of which it is member

14. Which of the following is not correct for virtual function in C++ ?
(1) Must be declared in public section of class.
(2) Virtual function can be static.
(3) Virtual function should be accessed using pointers.
(4) Virtual function is defined in base class.

Answer is: (2) Virtual function can be static. A virtual function must be declared within public section of base class and is overridden by the derived-class. When we refer to a derived class object using a reference of the base class, you can call a virtual function for that class object.then, version of the function defines in derived class will execute.

15. Which of the following is not correct (in C++) ?
(1) Class templates and function templates are instantiated in the same way.
(2) Class templates differ from function templates in the way they are initiated.
(3) Class template is initiated by defining an object using the template argument.
(4) Class templates are generally used for storage classes.

OPTION 2, 3, 4 ARE CORRECT (as per UGC answer key)

16. Which of the following is/are true with reference to ‘view’ in DBMS ?
(a) A ‘view’ is a special stored procedure executed when certain event occurs.
(b) A ‘view’ is a virtual table, which occurs after executing a pre-compiled query.(1) Only (a) is true
(2) Only (b) is true
(3) Both (a) and (b) are true
(4) Neither (a) nor (b) are true

(2) Only (b) is true View is the table or the result of query after query execution.

17. In SQL, __________ is an Aggregate function.
(1) SELECT (2) CREATE (3) AVG (4) MODIFY

Correct Answer is: AVG function used to find the average of the particular attribute values. e.g., to find avg salary of employee of a company.

18. Match the following with respect to RDBMS :
(a) Entity integrity (i) enforces some specific business rule that do not fall into entity or domain.
(b) Domain integrity(ii) Rows can’t be deleted which are used by other records
(c) Referential integrity(iii) enforces valid entries for a column
(d) User defined integrity (iv) No duplicate rows in a table
Code :
(1) (iii) (iv) (i) (ii)
(2) (iv) (iii) (ii) (i)
(3) (iv) (ii) (iii) (i)
(4) (ii) (iii) (iv) (i)

Correct Answer is: (2) (iv) (iii) (ii) (i)
Entity integrity: No duplicate rows in a table. Every entity(row) in the table must be unique based on the primary key of the table. Table would not allow the same primary key twice.
Domain integrity:Defines the what type of values to be inserted to the particular (attribute)column of DB for an entity. If we define the salary attribute in employee class then, domain of such values are numeric (say double). This integrity enforces valid entries for a column. (not allow alpha-numeric values for the salary).
Referential integrity: is based on foreign keys (so, it referred by other referencing table, deletion of such entries causes the undefined value for referencing table). Rows can’t be deleted which are used by other records.
User defined integrity: enforces some specific business rule that do not fall into entity or domain.
For e.g., you defining the constraint over the values of the attribute. let's assume that you are inserting the values to the table such that max and minimum salary for the part-time employee must be in in range 10,000 and 100. (So, you are restricting any insert to DB outside this salary range).

19. In RDBMS, different classes of relations are created using __________ technique to prevent modification anomalies.
(1) Functional Dependencies
(2) Data integrity
(3) Referential integrity
(4) Normal Forms

Correct Answer is: (4) Normal Forms
Normal forms are used to reduce the redundancy and increase the data consistency.

20. __________ SQL command changes one or more fields in a record.
(1) LOOK-UP
(2) INSERT
(3) MODIFY
(4) CHANGE

Correct Answer is: (3) MODIFY
21. Consider an array representation of an n element binary heap where the elements are stored
from index 1 to index n of the array. For the element stored at index i of the array (i<=n),
the index of the parent is :
(1) floor ((i+1)/2)
(2) ceiling ((i+1)/2)
(3) floor (i/2)
(4) ceiling (i/2)

Correct Answer is: (3) floor (i/2)
As shown below the root of the 13 and 10 are floor of the 4 and 5 respectively.

22. The following numbers are inserted into an empty binary search tree in the given order :
10, 1, 3, 5, 15, 12, 16. What is the height of the binary search tree ?
(1) 3
(2) 4
(3) 5
(4) 6

Correct Answer is: (1) 3
Here, height is longest path from root to the leaf node. As shown green number in below image indicates the count of the tree edges which has max height.

23. Let G be an undirected connected graph with distinct edge weight. Let Emax be the edge
with maximum weight and Emin the edge with minimum weight. Which of the following
statements is false ?
(1) Every minimum spanning tree of G must contain Emin.
(2) If Emax is in minimum spanning tree, then its removal must disconnect G.
(3) No minimum spanning tree contains Emax.
(4) G has a unique minimum spanning tree.

Correct Answer is: (3) No minimum spanning tree contains Emax.

24. A list of n strings, each of length n, is sorted into lexicographic order using merge - sort
algorithm. The worst case running time of this computation is :
(1) O(n log n)
(2) O(n2 log n)
(3) O(n2 + log n)
(4) O(n3)

Correct Answer is: (2) O(n2 log n)

25. Postorder traversal of a given binary search tree T produces following sequence of keys :
3, 5, 7, 9, 4, 17, 16, 20, 18, 15, 14
Which one of the following sequences of keys can be the result of an in-order traversal of
the tree T ?
(1) 3, 4, 5, 7, 9, 14, 20, 18, 17, 16, 15
(2) 20, 18, 17, 16, 15, 14, 3, 4, 5, 7, 9
(3) 20, 18, 17, 16, 15, 14, 9, 7, 5, 4, 3
(4) 3, 4, 5, 7, 9, 14, 15, 16, 17, 18, 20

Correct answer is: (4) 3, 4, 5, 7, 9, 14, 15, 16, 17, 18, 20
3, 5, 7, 9, 4, 17, 16, 20, 18, 15, 14
Here, the root of the binary tree is 14 (last element), as it's post-order traversal.
Right side of the tree contains bigger elements than 14
Left side of the tree contains bigger elements than 14
So, the first number >14 on left of root (14) (check from right to left).
=>root of right sub-tree is 15
So, the first number <14 on left of root (14) (check from right to left).
=>root of left sub-tree is 4
now we have two sequences: right tree and left tree
right tree:  17, 16, 20, 18, 15,
left tree: 3, 5, 7, 9, 4
Here, also similarly  find left and right sub-tree of both tree root-right(15) and the root-left(4).
So, final binary tree is

26. Which of the following devices takes data sent from one network device and forwards it to
the destination node based on MAC address ?
(1) Hub
(2) Modem
(3) Switch
(4) Gateway

Correct answer is: (3) Switch

27. __________ do not take their decisions on measurements or estimates of the current traffic
and topology.
(1) Static algorithms
(2) Adaptive algorithms
(3) Non - adaptive algorithms
(4) Recursive algorithms

Correct answer is: (3) Non - adaptive algorithms

28. The number of bits used for addressing in Gigabit Ethernet is __________.
(1) 32 bits
(2) 48 bits
(3) 64 bits
(4) 128 bits

Correct answer is: (2) 48 bits

29. Which of the following layer of OSI Reference model is also called end-to-end layer ?
(1) Network layer
(2) Datalink layer
(3) Session layer
(4) Transport layer

Correct answer is: (4) Transport layer

30. The IP address __________ is used by hosts when they are being booted.
(1) 0.0.0.0
(2) 1.0.0.0
(3) 1.1.1.1
(4) 255.255.255.255

Correct answer is:  (1) 0.0.0.0

31. Consider the following program fragment in assembly language :
          mov ax, 0h
          mov cx, 0A h
doloop :
          dec ax
          loop doloop
What is the value of ax and cx registers after the completion of the doloop ?
(1) ax=FFF5 h and cx=0 h
(2) ax=FFF6 h and cx=0 h
(3) ax=FFF7 h and cx=0A h
(4) ax=FFF5 h and cx=0A h

Correct Answer: (2) ax=FFF6 h and cx=0 h

32. Consider the following assembly program fragment :
stc
mov al, 11010110b
mov cl, 2
rcl al, 3
rol al, 4
shr al, cl
mul cl
The contents of the destination register ax (in hexadecimal) and the status of Carry Flag (CF) after the execution of above instructions, are :
(1) ax=003CH; CF=0
(2) ax=001EH; CF=0
(3) ax=007BH; CF=1
(4) ax=00B7H; CF=1

Correct Answer: (1) ax=003CH; CF=0

33. Which of the following regular expressions, each describing a language of binary numbers (MSB to LSB) that represents non-negative decimal values, does not include even values ?
(1) 0*1+0*1* (2) 0*1*0+1* (3) 0*1*0*1+ (4) 0+1*0*1* Where {+, *} are quantification characters.


34. Which of the following statements is/are TRUE ? (a) The grammar S → SS | a is ambiguous. (Where S is the start symbol) (b) The grammar S → 0S1 | 01S | ε is ambiguous. (The special symbol ε represents the empty string) (Where S is the start symbol) (c) The grammar (Where S is the start symbol) S → T/U T → x S y | xy | e U → yT generates a language consisting of the string yxxyy.
(1) Only (a) and (b) are TRUE.
(2) Only (a) and (c) are TRUE.
(3) Only (b) and (c) are TRUE.
(4) All of (a), (b) and (c) are TRUE.

Correct Answer: (4) All of (a), (b) and (c) are TRUE.

35. Match the description of several parts of a classic optimizing compiler in List - I, with the names of those parts in List - II : List - I List - II
(a) A part of a compiler (i) Optimizer syntax. that is responsible for recognizing (b) A part of a compiler that takes as input a stream of (ii) Semantic Analysis characters and produces as output a stream of words along with their associated syntactic categories. (c) A part of a compiler that understand the meanings of (iii) Parser variable names and other symbols and checks that they are used in ways consistent with their definitions. (d) An IR-to-IR transformer that tries to improve the IR (iv) Scanner program in some way (Intermediate Representation).
Code : (a) (b) (c) (d)
(1) (iii) (iv) (ii) (i)
(2) (iv) (iii) (ii) (i)
(3) (ii) (iv) (i) (iii)
(4) (ii) (iv) (iii) (i)

Correct Answer:  (1) (iii)  (iv)  (ii)   (i)

36. In Distributed system, the capacity of a system to adapt the increased service load is called ____.
(1) Tolerance
(2) Scalability
(3) Capability
(4) Loading

Correct Answer: (2) Scalability 

37. In __________ disk scheduling algorithm, the disk head moves from one end to other end of the disk, serving the requests along the way. When the head reaches the other end, it immediately returns to the beginning of the disk without serving any requests on the return trip.
(1) LOOK
(2) SCAN
(3) C - LOOK
(4) C - SCAN

Correct Answer:  (4) C - SCAN

38. Suppose there are six files F1, F2, F3, F4, F5, F6 with corresponding sizes 150 KB, 225 KB, 75 KB, 60 KB, 275 KB and 65 KB respectively. The files are to be stored on a sequential device in such a way that optimizes access time. In what order should the files be stored ?
(1) F5, F2, F1, F3, F6, F4
(2) F4, F6, F3, F1, F2, F5
(3) F1, F2, F3, F4, F5, F6
(4) F6, F5, F4, F3, F2, F1

Correct Answer:  (2) F4, F6, F3, F1, F2, F5
If we put the small file first then, then the average time to access all the file will be minimum. Lets put the largest file in  first place and smaller after that. then, in this case to access smaller file multiple time, systems need to cross the larger file sequentially each time which is very complex.

39. Which module gives control of the CPU to the process selected by the short-term scheduler?
(1) Dispatcher
(2) Interrupt
(3) Schedular
(4) Threading

Correct Answer: (1) Dispatcher

40. Two atomic operations permissible on Semaphores are __________ and __________.
(1) wait, stop
(2) wait, hold
(3) hold, signal
(4) wait, signal

Correct Answer: (4) wait, signal

41. Software does not wear-out in the traditional sense of the term, but software does tend to deteriorate as it evolves, because :
(1) Software suffers from exposure to hostile environments.
(2) Defects are more likely to arise after software has been used often.
(3) Multiple change requests introduce errors in component interactions.
(4) Software spare parts become harder to order.

Correct Answer: (3) Multiple change requests introduce errors in component interactions.

42. Software re-engineering is concerned with :
(1) Re-constructing the original source code from the existing machine (low - level) code program and modifying it to make it more user - friendly.
(2) Scrapping the source code of a software and re-writing it entirely from scratch.
(3) Re-organising and modifying existing software systems to make them more maintainable.
(4) Translating source code of an existing software to a new machine (low - level) language.

Correct Answer: (3) Re-organising and modifying existing software systems to make them more maintainable.

43. Which of the following is not a key issue stressed by an agile philosophy of software engineering ?
(1) The importance of self-organizing teams as well as communication and collaboration between team members and customers.
(2) Recognition that change represents opportunity.
(3) Emphasis on rapid delivery of software that satisfies the customer.
(4) Having a separate testing phase after a build phase.

Correct Answer:  (4) Having a separate testing phase after a build phase.

44. What is the normal order of activities in which traditional software testing is organized ?
(a) Integration Testing
(b) System Testing
(c) Unit Testing
(d) Validation Testing
Code :
(1) (c), (a), (b), (d)
(2) (c), (a), (d), (b)
(3) (d), (c), (b), (a)
(4) (b), (d), (a), (c)

Correct Answer: (2) (c), (a), (d), (b)

45. Which of the following testing techniques ensures that the software product runs correctly after the changes during maintenance ?
(1) Path Testing
(2) Integration Testing
(3) Unit Testing
(4) Regression Testing

Correct Answer: (4) Regression Testing

46. Which of the following Super Computers is the fastest Super Computer ?
(1) Sun-way TaihuLight
(2) Titan
(3) Piz Daint
(4) Sequoia

Correct Answer:  (1) Sun-way TaihuLight

47. Which of the following statements about ERP system is true ?
(1) Most ERP software implementations fully achieve seamless integration.
(2) ERP software packages are themselves combinations of seperate applications for manufacturing, materials, resource planning, general ledger, human resources, procurement and order entry.
(3) Integration of ERP systems can be achieved in only one way.
(4) An ERP package implemented uniformly throughout an enterprise is likely to contain very flexible connections to allow charges and software variations.

Correct Answer: (2)

48. Which of the following is not a Clustering method ?
(1) K - Mean method
(2) Self Organizing feature map method
(3) K - nearest neighbor method
(4) Agglomerative method

Correct Answer:(3) K - nearest neighbor method

49. Which of the given wireless technologies used in IoT, consumes the least amount of power ?
(1) Zigbee
(2) Bluetooth
(3) Wi-Fi
(4) GSM/CDMA

Correct Answer: (2) Bluetooth

50. Which speed up could be achieved according to Amdahl’s Law for infinite number of processes if 5% of a program is sequential and the remaining part is ideally parallel ?
(1) Infinite
(2) 5
(3) 20
(4) 50

Correct Answer: (3) 20

Sunday, 10 June 2018

Filters and commands in Unix with examples

Basic Filters and commands in unix systems

  • Commands in unix OS are case-sensitive i.e 'CLEAR' is different from 'clear' command. (if you try to run the CLEAR in terminal (it shows "command not found" message), 'clear' command  will clear the terminal space)
1. awk command : Pattern scanning and text processing language. Finds patterns and Replaces patterns or text, validate, index and database sort. 

This UNIX command utility scans a file by lines and also split the each line into columns based on default delimiter. Then match input fields/pattern to lines and also performs the specified actions on the matching line.

basic Builtin-variables:
NR : current record number in the total input stream.
NF : number of fields in the current record.

example:
~$ ls -l                            //list current directory files and folders
~$ ls -l  > testfile5                          //save the list current directory files and folders to the testfile5
~$ awk '{print $1,$6}' testfile5      //select the column 1 and 6 from the testfile5 and display

2. cat command:
The cat ("concatenate" ) is filter command of operating systems like Linux/Unix. cat utility command used to create one or more files, view content of file, concatenate different files and can redirect the output to files or terminal.

example:
~$ cat > testfile1      // to create file, exit terminal and save the file content after pressing CTRL+D.
~$ cat testfile            //command to display the content of the file to terminal 
~$ cat testfile3 >> testfile // Append the content of testfile3 to the end of testfile2.
3. comm command:
  • comm UNIX command compare two sorted files line by line and display in (terminal) standard output. 
  • Suppose there are two file, file1 contains the list of the student names opted for subject DBMS and file2 contains the list of the student names opted for subject OS. To find the student names who are common in both files then, comm command will help you to achieve result for above query.
  • To run this comm command content of the files to compare should be sorted. 
example:
~$ cat testfile6                         //displays the content of testfile6
~$ cat testfile7                         //displays the content of testfile7
~$ comm testfile6 testfile7     
In output of the above command,
First column shows distinct lines in testfile6
Second column shows distinct lines in testfile7
Third column shows lines common in both files

4. head command:
The head command, as the name suggesting that it display the first N lines of given input file content. By default, the value of N is 10 lines. While no option is mentioned then, by default, it display first 10 lines of the file content.

example:
~$ awk 'END { print NR}' testfile4      //prints the count of lines in testfile4
~$ head  testfile4                                      //by default(with no options), prints first 10 lines in testfile4
~$ head  testfile4 | awk 'END { print NR'//pipeline with above command, prints the count of lines
~$ head -n 4 testfile4                             //prints first 4 lines in testfile4

5. paste command:
  • It is used to merge files in horizontal/parallel manner consisting of lines from each specified file to output, separated by tab (delimiter).
  •  Write lines consisting of the sequentially corresponding lines from each FILE, separated by TABs, to standard output.
example:
~$ paste -d "|"  testfile1 testfile2     //merge parallel and  delimiter- "|"
In output, the first column consist of content of testfile1 and second column represent the content of testfile2 separated by delimiter "|" .

~$ paste -d "|#" testfile1 testfile2 testfile9 //merge parallel and delimiter-"|", "#" used as in image

~$ paste -s testfile1 testfile2 testfile9  //merge horizontally and  default delimiter- TAB


6. sed command:
  • Sed stands for stream editor. A sed command is used to perform basic text modifications on an input stream (a file or input from a pipeline). 
  • sed command works by making only one pass over the input(s), and is consequently more efficient. It used in the function on file like, searc, find, replace, insert or delete. most commonly used for substitution.
  •  By using sed command in UNIX you can edit files without opening it. This way it's much quicker way then to open that file in Editor and then modifying it.
  • SED command supports can perform complex pattern matching as it supports regular expression.
example:
~$sed 's/Jul/Oct/2' testfile8
In output, the 2nd occurrence of phrase "Jul" in each line will be replaced by the phrase "Oct" for content of testfile8. If the second occurrence of word  "Jul" found in line then, it replaced by "Oct", otherwise, it command for match in the next line. 

~$sed 's/Jul/Oct/g' testfile8
In output, the all occurrence of phrase "Jul" in each line will be replaced by the phrase "Oct" for content of testfile8.

~$sed  's/pradip/Pradip/2g'  testfile8   //second occurrence of "pradip" replaced to "PRADIP"
In output, starting from the 2nd occurrence each of phrase "Jul" in each line will be replaced by the phrase "Oct" for content of testfile8.

 7 . sort command:
  • Write sorted concatenation of all FILE(s) to standard output. 
  • sort command can also be used to sort numerically. (if file content is numerical), sort in reverse order, sort alphabetically, sort by month and can also used to remove duplicates.
  • By default, if no options specified then, command sorts assuming that the file contents are ASCII, the entire line is taken as sort key and Default field separator will be a Blank space.
example:
~$ cat testfile2   //The file display content of testfile2
~$ sort testfile2   //The file lines are sorted alphabetically. 
~$ sort -r testfile2  //The file lines are sorted alphabetically in reverse order.

8 . tail command:
  • The tail command, as the name refers that it display the last N lines of given input content. 
  • By default, the value of N is 10 lines. While no option is mentioned in command then it display last 10 lines of the file content.
example:
 ~$cat testfile4           //displays content of testfile4
 ~$tail -5 testfile4   //displays last five lines of testfile4 (total lines are 20)

 9 . tr command:
  • The tr ("translate" ) is filter command of operating systems like Linux/Unix. 
  • It is a command line utility to translate, squeeze, and/or delete characters from standard input, writing to standard output. 
  • It supports transformations like uppercase to lowercase, find and replace character . It can be used to support more complex transformations while used with UNIX pipes. 
example: 
~$cat testfile3 | tr “[a-z]” “[A-Z]”
In output, it replaces the all LOWERCASE letters to UPPERCASE alphabets with range specified and display translated content of the testfile3.
~$cat testfile3 | tr “[a-w]” “[A-W]”
In output, it replaces the all LOWERCASE letters to UPPERCASE alphabets with range specified and display translated content of the testfile3. If character is not in range then it will not be traslated.

 10 . uniq command:
  • The uniq command utility will filter adjacent matching lines from INPUT (or standard input), helps to find the adjacent duplicate lines and can be used to delete the duplicate lines and writes to file/OUTPUT (or standard output).
  • If no options provided then, matching lines are merged to the first occurrence.
example:
~$cat testfile2     //displays the testfile2
~$uniq testfile2   //in output, repeated lines are removed


UGC NET Computer Science December 2019 | Question 16

Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...

Popular Posts