Tuesday 20 December 2016

Write a program to merge two array into a single array?

Q : Write a program to merge two array into a single array?

/*     #################################
           Girfa Student Help
           Merge two Array
           Programmber : Vishal
           For more program visit : http://girfahelp.blogspot.in/p/c-language.html
       #################################
*/
#include<stdio.h>
#include<conio.h>
#define MAX 5
void main()
{
       int a1[MAX],a2[MAX],a3[MAX*2];
       int i,j;
       clrscr();
       puts("First Array Input");
       for(i=0;i<MAX;i++)

Monday 19 December 2016

Write a program to implement union and intersection?

Q.: Write a program to implement union and intersection?

/*   ##########################

     Girfa : Student Help
     For More Program Visit : http://girfahelp.blogspot.in/p/c-language.html
     Program to implement union and intersection
     ##########################*/
#include<stdio.h>
#include<conio.h>
#define MAX 5
int check_avl(int [],int,int); /* Check a number exist in an array */
void print(int [],int); /* Print an arrar*/
void main()
{
     int ar1[MAX],ar2[MAX],uni[MAX*2],ins[MAX];
     int uni_index,int_index,flag=0,i,j;
     clrscr();
     printf("\nFirst Array Input\n");
     for(i=0;i<MAX;i++)
     {
          printf("Enter %d Position number>> ",i+1);
          scanf("%d",&ar1[i]);
     }
     printf("\nSecond Array Input\n");
     for(i=0;i<MAX;i++)
     {
          printf("Enter %d Position number>> ",i+1);
          scanf("%d",&ar2[i]);
     }

Sunday 18 December 2016

UGC Net Computer Science Paper-1 Page 1

1. The English word ‘Communication’ is derived from the words
(A) Communis and Communicare
(B) Communist and Commune
(C) Communism and Communalism
(D) Communion and Common sense


Saturday 17 December 2016

Core Java Data – Type MCQ

1. What is the range of data type short in Java?
a) -128 to 127
b) -32768 to 32767
c) -2147483648 to 2147483647
d) None of the mentioned

2. An expression involving int, byte with literal numbers then resulting expression will be to which of these?
a) int
b) long
c) byte
d) float

3. Which of the following are legal lines of Java code?
1. int w = (int)888.8;
2. byte x = (byte)1L;
3. long y = (byte)12;
4. byte z = (byte)123L;
a) 1 and 2
b) 2 and 3
c) 3 and 4