1.write a program to merge the arrays
2.write efficient code for extracting unique elements from a
sorted list of array?

Answer Posted / jaggu

#include<stdio.h>
#include<conio.h>
main()
{
int a[5]={1,2,3,4,5},b[4]={-6,-7,-8,-9},i,j=0;
for(i=5;i<=5+4-1;i++)
{

a[i]=b[j];
j++;
}
for(i=0;i<9;i++)
printf("a[%d]=%d \t",i,a[i]);

getch();
}

Is This Answer Correct ?    17 Yes 55 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use main function?

637


What is echo in c programming?

557


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.

1495


Why is it important to memset a variable, immediately after allocating memory to it ?

1555


What is the meaning of typedef struct in c?

594






What is the meaning of ?

620


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1448


What does & mean in scanf?

604


What is the difference between new and malloc functions?

580


What is wrong with this program statement? void = 10;

820


What is #include stdio h and #include conio h?

603


Explain how can you tell whether a program was compiled using c versus c++?

578


Explain what is the advantage of a random access file?

666


What is the sizeof () operator?

624


Explain how can you check to see whether a symbol is defined?

663