Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Is array name a pointer?

993


How can you determine the maximum value that a numeric variable can hold?

1148


What is preprocessor with example?

997


Explain how do you use a pointer to a function?

1051


What do you mean by invalid pointer arithmetic?

1001


Is using exit() the same as using return?

1246


Tell us something about keyword 'auto'.

1010


What is struct node in c?

1017


what is bit rate & baud rate? plz give wave forms

1913


How will you find a duplicate number in a array without negating the nos ?

2081


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1022


Simplify the program segment if X = B then C ← true else C ← false

2957


What is a keyword?

1119


What does the file stdio.h contain?

998


show how link list can be used to repersent the following polynomial i) 5x+2

2190