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

In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

3087


Who developed c language and when?

1035


What are the types of operators in c?

1031


When should volatile modifier be used?

977


Can math operations be performed on a void pointer?

1017


How are variables declared in c?

1056


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

2979


What is output redirection?

1188


What are the 5 types of inheritance in c ++?

991


what are bit fields in c?

1635


How many keywords are there in c?

1042


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

1321


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

2176


What are the characteristics of arrays in c?

1007


why wipro wase

2277