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
What are actual arguments?
What is a loop?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
Explain what are global variables and explain how do you declare them?
Is file a keyword in c?
How many bytes are occupied by near, far and huge pointers (dos)?
What are derived data types in c?
5 Write an Algorithm to find the maximum and minimum items in a set of ānā element.
What is a good way to implement complex numbers in c?
What is meant by int main ()?
Where local variables are stored in c?
How to compare array with pointer in c?
Explain the properties of union.
Write a program on swapping (100, 50)