if array a conatins 'n' elements and array b conatins 'n-1'
elements.array b has all element which are present in array
a but one element is missing in array b. find that
element.
Answer Posted / sumanth
firt do sum of n elements in first array a i.e., n(n+1)/2
next the sum of n-1 elements in second array b i.e., n(n-1)/2...
from diff of these 2 sums we will get the missing element in b
| Is This Answer Correct ? | 30 Yes | 11 No |
Post New Answer View All Answers
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
What is meant by int main ()?
How can you increase the allowable number of simultaneously open files?
What's the total generic pointer type?
What are the types of operators in c?
How can I implement a delay, or time a users response, with sub-second resolution?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
What is the difference between array_name and &array_name?
When should the const modifier be used?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
Differentiate between Macro and ordinary definition.
What is static and auto variables in c?
What happens if a header file is included twice?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above