Wednesday 28 December 2016

UGC Net Computer Science Paper II Dec 12,Page 4 (Solve)

UGC Net Computer Science Paper II Dec 12,Page 4 (Solve)

31. Basis path testing falls under
(A) system testing
(B) white box testing
(C) black box testing
(D) unit testing
Answer : B
Explanation : The basis path testing is same, but it is based on a white box testing method, that defines test cases based on the flows or logical path that can be taken through the program. Basis path testing involves execution of all possible blocks in a program and achieves maximum path coverage with least number of test cases. It is a hybrid of branch testing and path testing methods.

The objective behind basis path testing is that it defines the number of independent paths, thus the number of test cases needed can be defined explicitly (maximizes the coverage of each test case).
     
     int a,b;
     for(a=1,b=2;a<=10;a++)
          printf("\n%d",a*b);

Basis Path Testing Diagram



Basis Path Testing


32. The User Work Area (UWA) is a set of Program variables declared in the host program to communicate the contents of individual records between
(A) DBMS & the Host record
(B) Host program and Host record
(C) Host program and DBMS
(D) Host program and Host language
Answer : C
Explanation :A set of program variables, declared in the host program, to communicate the contents of individual records between the DBMS and the host program.

For each record type in the database schema, a corresponding program variable with the same format should be declared in the host program.


33. Consider the tree given below :

eccentricity


Using the property of eccentricity of a vertex, find every vertex that is the centre of the given tree.
(A) d & h
(B) c & k
(C) g, b, c, h, i, m
(D) c & h
Answer : D
Explanation :The maximum distance between a vertex to all other vertices is considered as the eccentricity of vertex.
Having values of eccentricity of all nodes, we can define radius of graph as minimal one among them:
Center of graph is set of nodes with eccentricity equal to the radius of graph:

34. The maximum number of keys stored in a B-tree of order m and depth d is
(A) md + 1 – 1
(B) md+1 – 1/m – 1
(C) (m – 1) (md + 1 – 1)
(D) md – 1 /m – 1
Answer : B
35. Which of the following is the most powerful parring method ?
(A) LL(I)
(B) Canonical LR
(C) SLR
(D) LALR
Answer : B
Explanation : In all parsing techniques Canonical LR which is  CLR is the nearly all the powerful method. We can also show the order of method in increasing power as below. LL(1) < SLR < LALR < CLR

36. In UNIX, which of the following command is used to set the task priority ?
(A) init
(B) nice
(C) kill
(D) PS
Answer : B
Explanation :  modified the scheduling priority of a process. It directly maps to a kernel call of the same name. nice is used to invoke a utility or shell script with a particular priority, thus giving the process more or less CPU time than other processes. Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process).
Syntax : 
nice [OPTION] [COMMAND [ARG]...]
Example :
nice -n13 pico girfa.txt

37. AES is a round cipher based on the Rijndal Algorithm that uses a 128-bit block of data. AES has three different configurations. ______ rounds with a key size of 128 bits, ______ rounds
with a key size of 192 bits and ______ rounds with a key size of 256 bits.
(A) 5, 7, 15
(B) 10, 12, 14
(C) 5, 6, 7
(D) 20, 12, 14
Answer : B
Explanation : AES is based on a design principle known as a substitution-permutation network, combination of both substitution and permutation, and is fast in both software and hardware. Unlike its predecessor DES, AES does not use a Feistel network. AES is a variant of Rijndael which has a fixed block size of 128 bits, and a key size of 128, 192, or 256 bits. By contrast, the Rijndael specification per se is specified with block and key sizes that may be any multiple of 32 bits, both with a minimum of 128 and a maximum of 256 bits.

AES operates on a 4 × 4 column-major order matrix of bytes, termed the state, although some versions of Rijndael have a larger block size and have additional columns in the state. Most AES calculations are done in a special finite field.

For instance, if there are 16 bytes, b0,b1...,b15,these bytes are represented as this matrix:
Advanced Encryption Standard (AES)
The key size used for an AES cipher specifies the number of repetitions of transformation rounds that convert the input, called the plaintext, into the final output, called the ciphertext. The number of cycles of repetition are as follows:

  • 10 cycles of repetition for 128-bit keys.
  • 12 cycles of repetition for 192-bit keys.
  • 14 cycles of repetition for 256-bit keys.

Each round consists of several processing steps, each containing four similar but different stages, including one that depends on the encryption key itself. A set of reverse rounds are applied to transform ciphertext back into the original plaintext using the same encryption key.

38. Match the following IC families with their basic circuits :
a. TTL          1. NAND
b. ECL          2. NOR
c. CMOS       3. Inverter
Code :
       a b c
(A) 1 2 3
(B) 3 2 1
(C) 2 3 1
(D) 2 1 3

Answer : A
Explanation : ilding block of TTL logic family is made with NAND gate.

This particular circuit is of one 4-input OR/NOR gate. Standard voltages for this circuit are -5.2 volts (VEE) and ground (VCC). Unused inputs are connected to VEE. The bias circuit at the right side, consisting of one transistor and its associated diodes and resistors, can handle any number of gates in a single IC package. Typical ICs include dual 4-input, triple 3-input, and quad 2-input gates. In each case, the gates themselves differ only in how many input transistors they have. A single bias circuit serves all gates.

CMOS logic families is most preferred in large scale integrated circuits. CMOS (Complementary Metal Oxide Semiconductor) has complementary and symmetrical NMOS and PMOS transistors. Figure shown below is a CMOS inverter.

39. Match the following with respect to C++ data types :

a. User defined type             1. Qualifier
b. Built in type                     2. Union
c. Derived type                    3. Void
d. Long double                    4. Pointer
Code :
       a b c d
(A) 2 3 4 1
(B) 3 1 4 2
(C) 4 1 2 3
(D) 3 4 1 2
Answer : A
Explanation : 

Union 
Union is user defined data type which occupy space equivalent to largest data type inside of it.

Build in data type 

Build in data type  or fundamental data type in c (void,int,float,double,long)

Derived data types

Derived data types are object types which are aggregates of one or more types of basic data types. The most common derived data types are pointers, arrays, structures and unions. These data types have all proven to be great additions to the C language and a programmer should understand them. A pointer is essentially a value which points to another data space.

Qualifier

Some keywords change the behavior of the "int" type. These are known as qualifier. Examples include "short", "long", "unsigned", "const", "volatile". Therefore if we qualify the "int" with "short" we know that the variable contains at least 16 bits:

40. Given an empty stack, after performing push (1), push (2), Pop, push (3), push (4), Pop, Pop, push(5), Pop, what is the value of the top of the stack ?
(A) 4
(B) 3
(C) 2
(D) 1
Answer : B
Explanation : 




No comments:

Post a Comment