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
Is array name a pointer?
How can you determine the maximum value that a numeric variable can hold?
What is preprocessor with example?
Explain how do you use a pointer to a function?
What do you mean by invalid pointer arithmetic?
Is using exit() the same as using return?
Tell us something about keyword 'auto'.
What is struct node in c?
what is bit rate & baud rate? plz give wave forms
How will you find a duplicate number in a array without negating the nos ?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
Simplify the program segment if X = B then C ← true else C ← false
What is a keyword?
What does the file stdio.h contain?
show how link list can be used to repersent the following polynomial i) 5x+2