Tuesday 24 October 2017

UGC Net Computer Science December-12 Page 6 Solved

UGC Net Computer Science December-12 Paper 3 Page 6 Solved

UGC Net Computer Science December-12 Page 6 Solved

51. Suppose there are logn sorted lists of n logn elements each. The time complexity of producing a sorted list of all these elements is (use heap data structure)

UGC Net Computer Science December-12 Page 5 Solved

UGC Net Computer Science December-12 Paper 3 Page 5 Solved

UGC Net Computer Science December-12  Page 5 Solved

41. Consider a system having m resources of the same type. These resources are shared by 3 processes A, B and C which have peak demands of 3, 4 and 6 respectively. For what value of m
deadlock will not occur ?
(A) 7
(B) 9
(C) 10
(D) 13

42. The grammar ‘G1’ S -> OSO| ISI | 0|1|→ and the grammar ‘G2’ is S → as |asb| X, X → Xa | a.
Which is the correct statement ?
(A) G1 is ambiguous, G2 is unambiguous
(B) G1 is unambiguous, G2 is ambiguous
(C) Both G1 and G2 are ambiguous

NIELIT O Level Paper Solution July-2012 C Language

NIELIT O Level Paper Solution July-2012 C Language

1. Objective


1.1 : C
1.2 : C
1.3 : B
1.4 : D
1.5 : A
1.6 : B
1.7 : C
1.8 : B

Sunday 22 October 2017

Even Odd Separation File Creation

Q : Write a ‘C’ Program to create a file of numbers and copy odd number into second file and even number into third file.

Solution :


#include<stdio.h>
#include<conio.h>
void main()
{
     FILE *source,*even_file,*odd_file;
     char ch;
     clrscr();
     source=fopen("test.txt","r");
     even_file=fopen("even.txt","w");
     odd_file=fopen("o