Question

Define an array. Write an interactive C program to take two single dimensional arrays of integers and merge them into a single dimensional array, excluding the common elements of both the arrays.

24 Nov 2017
Answer :
Word Count : 929

Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.

Instead of declaring individual variables, such as number0, number1, ..., and number99, you declare one array variable such as numbers and use numbers[0], numbers[1], and ..., numbers[99] to represent individual variables. A specific element in an array is accessed by an index.

All arrays consist of contiguous memory locations. The lowest address corresponds to the first element and the highest address to the last element.

Arrays in C

 

#include<stdio.h>

void sort(int a[])

{

int i,j,t;

for(i=0;i<=4;i++)

{

for(j=i;j<=4;j++)

{

___ _______ _______ ____ _________ ______ ________ ___.
_________ __________ _________ _________ __________ ________.
_____ _________ _____ __________ ___ _______ _____ _______ ___ ______ _____.
_________ ________ __________ _______ ________ ___ ____ _________ ____ ___ _______ ____.
__________ ______ ________ ______ __________ __________.
__________ ______ _____ __________ __________ __________ ________ _____.
__________ ___ _________ ________ _____ ____ ______ _________.
________ ________ __________ _________ ________ ________ _________ ______.
___ ______ ___ _______ __________ ______ ________ _______ ____ __________ ________ ____.
________ ______ ____ ___ _____ ___.
_________ _____ __________ _____ _______ _______.
_________ _____ ________ _____ ______ ____ _____ _____ ____ __________ _____.
_____ __________ _____ _______ _____.
_______ _____ _________ __________ ______ __________ _________ ______ ___.
_______ _________ _________ _____ ____ ________ _________ ___ _____ _____.
_________ __________ _____ ___ ________ ________ _________.
_________ _____ __________ ___ _________.
________ ____ ______ ________ __________ _________ _______ _______ _________ __________.
____ ____ ___ ________ ___ _________ _____ __________.
____ _______ ________ _________ ________ ______ ______ __________ _________.
______ _________ ______ ___ _____ _________ __________ ________ ______ _________ ___.
__________ __________ _____ ________ __________ ________ __________ ______ ____ ______ ______.
____ ____ ____ __________ _______.
__________ ______ _____ ______ ____.
_________ ________ _____ ______ ______ _______ ______ _____ _________ _______.
________ _______ __________ ____ _______ ________ _____ _____ ____ __________ _________ _____.
________ _________ ________ ____ __________ _____ __________ ____ ______ _______ ____.
_____ ______ ______ ______ _________ ____.
__________ ___ ________ _______ ______ ____ ___ ______ ____ ___.
_________ ______ ________ _______ _______ ___ _________ _______ ____ ______.
_________ ____ ____ ______ ________ _________ __________ ____ ______ _______.
_____ ______ _____ ___ _________ _______ ___ ____ __________ __________ _________ _______.
___ _______ ______ __________ ________ ________.
____ _______ __________ __________ ____ _____ ______ _____ _______ ___.
_________ ________ ________ _____ _________ _________.
____ ____ ________ ______ __________ __________ ________ ____ ______ __________ ____.
________ ___ ____ ___ _______ _____ __________ ___ _____ _______ ______ ________.
____ __________ ____ _____ _____ ______ __________ _________ _____ __________ ________ ______.
_________ ________ ____ ____ _______ ________ __________ _________ _______ ______ __________.
____ __________ ___ ____ _________ ____ _____ _____ ____ __________ ___ ___.
____ ______ _______ ____ _____ _________ _______ _____ _________ _______.
________ _________ __________ ________ _______ __________ __________ _____ _______ _______ ________.
_____ ________ ___ __________ ___ _______ ____ ___ ______ ________ ___.
___ ______ _____ ___ __________ ___ __________.
__________ _____ __________ __________ ______.
__________ _________ _________ ________ ____ ____ ______ __________ _________.
_____ _____ _____ _______ _______ _________ _________.
_________ ________ ________ ____ ______ ___ ____ _________ _____ __________ __________.
__________ ________ ____ ___ ________.
_______ ______ ____ ___ __________ ________.
_________ _______ ________ __________ ______ _____ __________.
______ ___ ___ _____ ______ _______ ________ _____ _______ ______ _____ _________.
______ ______ ______ __________ ____ ______ _______.
_______ _______ ______ __________ _________ _______ ______ ________ _________.
_____ _________ _______ ________ _________ ______ ____ ______.
__________ ____ __________ __________ _________ ______.
_____ __________ ______ __________ _________ __________ _____ _____ ____.
_________ ________ _________ __________ _____ _______ ________.
_____ __________ ______ ___ _______.
________ _________ ________ ______ _______ __________ ______ ___ ____ ____ _______.
________ _______ _________ _____ _____.
___ ________ ____ ________ _________ ______ ___.
__________ ________ ____ ___ _________ _____ ________.
____ ________ _______ ________ _________ ____ _____ _____ ______ ___ _______.
______ ___ ________ _______ __________ _______ __________ ________ _________ ________ _________ ________.
____ _____ _________ ________ ______ ________ _________ _________.
____ ____ _________ ________ _______ _____ ___.
______ ________ __________ ___ _______.
____ ___ _________ ______ _______ ____ __________ ___ _______ ________ _____.
_________ ________ ___ _________ _______ ______ _______ ___.
__________ __________ _______ _____ __________ __________ ____ ______.
___ _____ _________ ___ _________.
_________ ________ ______ ____ _________ ________ _________ _____ _________ ___.
________ ________ ________ ______ ________ ____ ____ ____ ___ __________ _____.
_________ ______ ________ _______ _____ ______ _______ _____.
____ _________ _________ ___ ________ _____ __________ ____ ________ ______.
_____ _________ ______ ________ _______ ________ _________ ____ ________ _____ ____ _________.
_________ _______ _________ ______ _____.
__________ ___ ___ ___ ________ ________ __________ __________.
____ _____ ________ ____ ______.
___ ____ ______ ______ ____.
_________ _______ ________ ___ _____ __________ _______ _______.

IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top