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
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.
Who developed c language and when?
What are the types of operators in c?
When should volatile modifier be used?
Can math operations be performed on a void pointer?
How are variables declared in c?
Simplify the program segment if X = B then C ← true else C ← false
What is output redirection?
What are the 5 types of inheritance in c ++?
what are bit fields in c?
How many keywords are there in c?
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
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.
What are the characteristics of arrays in c?
why wipro wase