Friday, August 28, 2020

UGC-NET Computer Science Previous Year Question Papers

UGC-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

CBSE-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

NTA-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 


Q:10 Consider a relation R (A, B, C, D, E, F, G, H), where each attribute is atomic, and following functional dependencies exist.

CH → G
A → BC
B → CFH
E → A
F → EG

The relation R is __________ .
(A) in 1NF but not in 2NF
(B) in 2NF but not in 3NF
(C) in 3NF but not in BCNF
(D) in BCNF


Answer: (A)

Explanation: If we find closure of A:

A+ → All atribute except D.
Similarly for other keys we can find closure, but D can’t be derived from any key and it must be added to all keys to be derived from. That’s why this relation is in 1NF, since there is partial dependency so, this relation is not in 2NF.
So, option (A) is correct.

UGC-NET Computer Science Previous Year Question Papers

 UGC-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

CBSE-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

NTA-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION


Q: 9 If every non-key attribute is functionally dependent on the primary key, then the relation is in __________ .

(A) First normal form
(B) Second normal form
(C) Third normal form
(D) Fourth normal form


Answer: (B)

Explanation: Conditions for various normal forms:

  1. 1 NF – A relation R is in first normal form (1NF) if and only if all underlying domains contain atomic values only.
  2. 2 NF – A relation R is in second normal form (2NF) if and only if it is in 1NF and every non-key attribute is fully dependent on the primary key.
  3. 3 NF – A relation R is in third normal form (3NF) if and only if it is in 2NF and every non-key attribute is non-transitively dependent on the primary key.
  4. BCNF – A relation R is in Boyce-Codd normal form (BCNF) if and only if every determinant is a candidate key.

 

UGC-NET Computer Science Previous Year Question Papers

  UGC-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

CBSE-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

NTA-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

GATE 2016 SET-2 Q:32

Topic: DBMS

Q: 8 Suppose a database schedule S involves transactions T1, T2, ………….,Tn. Consider the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule ?

(A) Topological order
(B) Depth – first order
(C) Breadth – first order
(D) Ascending order of transaction indices


Answer: (A)

Explanation: For a schedule, we can check its serializability by drawing a precedence graph and find its topological order, precedence graph of schedule must not contain any cycle to be conflict free.

Cycle in precedence graph tells that schedule is not conflict serializable. DFS and BFS traversal of graph are possible even if graph contains cycle. And hence DFS and BFS are also possible for non serializable graphs. But Topological sort of any cyclic graph is not possible. Thus topological sort guarantees graph to be serializable . Option D is not valid because in a transaction with more indices might have to come before lower one. Also two non- conflicting schedule can occur simultaneously.

So, option (A) is correct.

UGC-NET Computer Science Previous Year Question Papers

 UGC-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

CBSE-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

NTA-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 


Question 65 GATE-CS-2014-(Set-1) | Question 65 2014 GATE

Q:7 Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item X, denoted by r(X) and w(X) respectively. Which one of them is conflict serializable ?

S1: r1(X); r2(X); w1(X); r3(X); w2(X)

S2: r2(X); r1(X); w2(X); r3(X); w1(X)

S3: r3(X); r2(X); r1(X); w2(X); w1(X)

S4: r2(X); w2(X); r3(X); r1(X); w1(X)

(A) S1
(B) S2
(C) S3
(D) S4


Answer: (D)

Explanation: We can draw precedence graph for each schedule and for conflict serializability graph must not contain cycle.
conflict


So, option (D) is correct.

UGC-NET Computer Science Previous Year Question Papers

 UGC-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

CBSE-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

NTA-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

Q:6 A micro-instruction format has micro-ops field which is divided into three subfields F1, F2, F3 each having seven distinct micro-operations, condition field CD for four status bits, branch field BR having four options used in conjunction with address field ADF. The address space is of 128 memory locations. The size of micro-instruction is:

(A) 17
(B) 20
(C) 24
(D) 32


Answer: (B)

Explanation: Microprocessor instruction format, which is divided into three subfields F1, F2, F3 each having seven distinct micro-operations, condition field CD for four status bits, branch field BR having four options used in conjunction with address field ADF. The address space is of 128 memory locations.ie:
q8
F1,F2,F3 each having seven distinct micro-operation. So, 3 bits are required for each.
Condition field have four status, it needs 2 bits for four different condition.
Branch field have four option so,it needs 2 bits for four option.
Now there are 128 different memory location, So, there 7 bits atre required for 128 diffeent location.
Instruction Field:
q8 (1)Total bits are 20.
So, option (B) is correct.

Wednesday, August 26, 2020

UGC-NET Computer Science Previous Year Question Papers


UGC-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 
CBSE-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

NTA-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION  

Q:5 Which of the following is correct statement ?

(A) In memory – mapped I/O, the CPU can manipulate I/O data residing in interface registers that are not used to manipulate memory words.
(B) The isolated I/O method isolates memory and I/O addresses so that memory address range is not affected by interface address assignment.
(C) In asynchronous serial transfer of data the two units share a common clock.
(D) In synchronous serial transmission of data the two units have different clocks.


Answer: (B)

Explanation:

  • The isolated I/O method isolates memory and I/O addresses so that memory address range is not affected by interface address assignment.
  • Memory based I/O uses same address space for memory and I/O devices.
  • In asynchronous serial transfer of data the two units do not share a common clock.
  • In synchronous serial transfer of data the two units share a common clock.
Option (B) is correct.

UGC-NET Computer Science Previous Year Question Papers

UGC-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 
CBSE-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

NTA-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION  

Q:4 Which of the following addressing mode is best suited to access elements of an array of contiguous memory locations ?

(A) Indexed addressing mode
(B) Base Register addressing mode
(C) Relative address mode
(D) Displacement mode


Answer: (A)

Explanation: Indexed addressing mode is best suited for accessing an array in contiguous memory location.
So, option (A) is correct.
UGC-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 
CBSE-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 
NTA-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

Q:3 In the architecture of 8085 microprocessor match the following:

1

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


Answer: (B)

Explanation:

  • ALU is the arithmetic logic unit and it involves processing of input into desired output.
  • Timing and control instruction are covered in instruction unit of microprocessor.
  • There are some general purpose register in storage and interface unit.
  • While an interrupt is a signal to the processor which required attention from processor, an interrupt is serviced on the basis of priority and need.

So, option (B) is correct.

UGC-NET Computer Science Previous Year Question Papers

 UGC-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

CBSE-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

NTA-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

Q:2 In 8085 microprocessor the address bus is of __________ bits.
(A) 4
(B) 8
(C) 16
(D) 32


Answer: (C)

Explanation: In 8085 microprocessor 16 bits are used for address bus and 65,536(216 = 65,536) different memory location are possible.
So, option (C) is correct.

Sunday, August 23, 2020

UGC-NET Computer Science Previous Year Question Papers

UGC-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 
CBSE-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 
NTA-NET NOVEMBER 2017 QUESTIONS WITH EXPLANATION 

Q:1 In 8085 microprocessor which of the following flag(s) is (are) affected by an arithmetic operation ? 

(A) AC flag Only 
(B) CY flag Only 
(C) Z flag Only 
(D) AC, CY, Z flags 

 Answer: (D) 

Explanation: AC is auxiliary-Carry flag, CY is Carry flag and Z is Zero flag. All these flags will be affected during arithmetic operation. So, option (D) is correct.

Tuesday, May 16, 2017

C Program to Check Whether a Number is Prime or Not

C Program to Check Whether a Number is Prime or Not


#include<stdio.h>
#include<conio.h>
void main()
{
int n,i=2,f=1;
clrscr();
printf("Enter a Number other than 1");
scanf("%d",&n);
while(i*i<=n)
{
if(n%i==0)
{
f=0;
break;
}
i++;

}
if(f)
printf("Prime Number");
else
printf("Not Prime Number");
getch();
}

To check whether a number is prime or not we need to check that if the number is divisible by any of the numbers lying between 2 to squareroot(n). If it is divisible by any one of these then it is not prime otherwise the number is prime. 

Monday, March 13, 2017

C Program to Check whether a Number is Even or Odd without using Arithmetic Operators

We can check whether a number is even or odd without using arithmetic operators in C to do this let us first consider the binary of some of numbers

1:00000001
2:00000010
3:00000011
4:00000100
5:00000101
6:00000110
There is a catch here, we can see that each of the odd number has the rightmost(LSB) bit as '1'. We can use this information and find out whether a number is even or odd. If we apply 'bitwise &' operator on number and 00000001, it will result in 00000001 if the number is odd.

Here is the C code :

#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("***************Even or Odd without Arithmetic Operators****************\n");
printf("Enter a Number");
scanf("%d",&n);
if(n&1==1)
printf("It is Odd");
else
printf("It is even");
getch();
}

Hope you like the solution.




Best program to find  whether a Number is Even or Odd without using Arithmetic Operators 
Best algorithm to find  whether a Number is Even or Odd without using Arithmetic Operators 
Best algorithm to check  whether a Number is Even or Odd without using Arithmetic Operators 
Best program to check  whether a Number is Even or Odd without using Arithmetic Operators
Best C program to find  whether a Number is Even or Odd without using Arithmetic Operators 
Best C program to check  whether a Number is Even or Odd without using Arithmetic Operators
C program to check  whether a Number is Even or Odd without using Arithmetic Operators 

Sunday, March 12, 2017

C Program to Print Fibonacci Series



In mathematics, the Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and characterized by the fact that every number after the first two is the sum of the two preceding ones:

1,1,2,3,5,8,13,21,34,55,89,144...
Often, especially in modern usage, the sequence is extended by one more initial term:

0,1,1,2,3,5,8,13,21,34,55,89,144...



By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending on the chosen starting point of the sequence, and each subsequent number is the sum of the previous two.

In mathematical terms, the sequence F(n) of Fibonacci numbers is defined by the recurrence relation:

F(n) = F(n-1) + F(n-2)

It defines that the the nth term of the sequence is sum of two previous terms.

F(4) = F(3) + F(2) = 1 + 1 = 2 

Here is a non-recursive  code of C Program to print first 'n' terms of Fibonacci Series

#include<stdio.h>
void main()
{
int a=-1,b=1,n,i,c;
printf("\n************************Fibonacci Series****************************\n");
printf("Enter number of terms you want to print\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
c=a+b;
a=b;
b=c;
printf("%d\t",c);
}
}

Here is a recursive  version code of C Program to print first 'n' terms of Fibonacci Series

#include<stdio.h>
int fib(int n)
{
if(n==1)
return 0;
else if(n==2)
return 1;
else
return fib(n-1)+fib(n-2);

}
void main()
{
int n,s,i=1;
clrscr();
printf("\n************************Fibonacci Series****************************\n");
printf("Enter number of terms you want to print\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
s=fib(i);
printf("%d\t",s);
}
}
Output::



C Program to print first 'n' terms of Fibonacci Series

non-recursive code of C Program to print first 'n' terms of Fibonacci Series
Fibonacci series in c
recursive version code of C Program to print first 'n' terms of Fibonacci Series
c program for Fibonacci series without and with recursion.
best program to print fibonacci series


Fibonacci Series algorithm ,Fibonacci Series non-recursive algorithm ,Fibonacci Series iterative algrothim ,Fibonacci Series recursive program in c,

Wednesday, March 8, 2017

UGC-NET January 2017 Assembly Language Question with Explanation

Q:: 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 true in ax register after execution of above instructions?
(1)0270H                                                                         (2)0170H

(3)01E0H                                                                         (4)0370H

Answer:: (1)

Explanation::

mov al, 15

It means move 15 to lower part of 'ax' register

mov ah, 15

It means move 15 to higher part of 'ax' register

The 'ax' register content looks like 

0000111100001111

xor al,al

It means 'XORing lower part of 'ax' register with its own content and storing result back in 'al' , now the 'ax' register content will be

       00001111
       00001111
xor00000000

'ax' register content::  0000111100000000

move cl,3

It means move 3 to lower part of 'cx' register

The 'c' register content looks like 

0000000000000011

shr ax, cl

It will shift right and rotate content of 'ax' register

The 'ax' register content looks like 

0000000111100000

add al, 90H

Add hexadecimal 90 to al


   0000000111100000
   0000000010010000
+0000001001110000

adc ah,0

It means addition with carry which does not affect 'ax' register

So, content of ax register will be 0270H.







UGC-NET January 2017 Assembly Language Question with Explanation, Assembly language, assembly programs, cbse NET January 2017 Assembly Language Question with Explanation,UGC-NET January 2017 Assembly Language programs with Explanation,

Tuesday, March 7, 2017

UGC NET Algorithm Solved Question

Q:: What is the maximum number of comparisons to find minimum and maximum element from an array with n elements ?

(A) 2n-2                                                            (B) 2n

(C) 1.5n-2                                                         (D) n

Answer :: (C)

Explanation:: 

Let us take some array elements as 12, 34, 5, 66, 22, 43, 7, 9

First of all we will compare first and second element and keep the larger one as max and smaller as min, then we take next two elements and compare them and then compare the larger with max and smaller with min like this we have 3 comparison for every two elements So 1.5 for each element making a total of 1.5n but for the first two we only make one comparison so finally no. of comparison become 1.5n-2.
So, (C) is correct.

C Program to find Maximum and Minimum element from array

#include<stdio.h>
#include<conio.h>
void main()
{
int i,min,a[100],max,n;
clrscr();
printf("Enter no. of elements to be stored");
scanf("%d",&n);
for(i=0;i<n;i=i+2)
{
printf("Enter no.\n");
scanf("%d",&a[i]);
}
if(a[0]>a[1])
{
max=a[0];min=a[1];
}
else
{
max=a[1];min=a[0];
}

for(i=2;i<=n-2;i++)
{
    if(a[i]>a[i+1])
    {
if(a[i]>max)
max=a[i];
if(a[i+1]<min)
min=a[i+1];
    }
    else
    {
if(a[i]<min)
min=a[i];
if(a[i+1]>max)
max=a[i+1];
    }

}

printf("\nMAX = %d\nMIN = %d",max,min);
getch();
}












C Program to find Maximum and Minimum element from array, complexity of finding Maximum and Minimum element from array, max and min element from array, best algorithm to find Maximum and Minimum element from array

UGC-NET January 2017 Paper-2 Discrete Maths Questions Solved

Q:: 4 How many multiples of 6 are there between the following pairs of numbers? 0 and 100 – 6 and 34

(1)16 and 6                                                       (2)  17 and 6 

(3)  17 and 7                                                     (4)  16 and 7

Answer:: (1)

Explanation::

Numbers divisible by 6 between 0 and 100 are::

6,12,18,...96 So there are 16 such numbers as nth term of A.P. is given by Tn = a+(n-1)d

In our example a = 6, d = 6, Tn=96 

96 = 6 + (n-1)*6 => n = 16

Similarly between -6 and 34 numbers divisible by 6 are::

0,6,12,...30   So there are 6 such numbers as this also form an A.P. 

a=0 , d=6, tn=30

30 = 0+(n-1)*6 => n=6

So correct option is (1) 






cbse-NET January 2017 Paper-2 Discrete Maths Question Solved
UGC-NET January 2017 Paper-2 Solved UGC-NET January 2017 Paper-2 UGC-NET January 2017 Paper-2 questions with solution UGC-NET January 2017 Paper-2 question 1 solved complete solution UGC-NET January 2017 Paper-2


cbse-NET January 2017 Paper-2 Solved cbse-NET January 2017 Paper-2 cbse-NET January 2017 Paper-2 questions with solution cbse-NET January 2017

UGC-NET January 2017 Paper-2 Discrete Maths Questions Solved

  1. Q:: 3  The functions mapping R into R are defined as: f(x) =  and h(x) = .

Then find the value of the following composite functions: hog(x) and hogof(x)

(1)        and     
(2)        and     
(3)      and    
(4)      and   


Answer:: (4)

Explanation::

hog(x) = h(g(x)) = (1/(x^2+1))^4 = (x^2 + 1)^-4

hogof(x) = ho(g(f(x))) = 

Now g(f(x)) = 1/((x^3-4x)^2 + 1)

h(g(f(x))) = h(1/((x^3-4x)^2 + 1)) = (1/((x^3-4x)^2 + 1))^4 

((x^3-4x)^2 + 1)^-4


Hence  hog(x) = (x^2 + 1)^-4 and hogof(x) =  ((x^3-4x)^2 + 1)^-4

So correct answer is (D)
















UGC-NET January 2017 Paper-2 discrete maths questions with solution
UGC-NET January 2017 Paper-2 Solved UGC-NET January 2017 Paper-2 UGC-NET January 2017 Paper-2 questions with solution UGC-NET January 2017 Paper-2 question 3 solved complete solution UGC-NET January 2017 Paper-2 

cbse-NET January 2017 Paper-2 Solved cbse-NET January 2017 Paper-2 cbse-NET January 2017 Paper-2 questions with solution cbse-NET January 2017 Paper-2 question 3 solved complete solution cbse-NET January 2017 Paper-2 

Coding Acceleration Program

🚀 CODING ACCELERATION PROGRAM (90 DAYS) Build Strong Foundations Learn to Think Like a Programmer Get Placement Ready 💡 Learn C Progra...