Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
18Activity
0 of .
Results for:
No results containing your search query
P. 1
nagarro placement questions and solution 2011-2012

nagarro placement questions and solution 2011-2012

Ratings:

3.67

(1)
|Views: 7,561|Likes:
Published by Ankit Bharathan

solutions to nagarro placement questions: (some solutions may not be optimal)

solutions to nagarro placement questions: (some solutions may not be optimal)

More info:

Published by: Ankit Bharathan on Dec 18, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
See more
See less

07/23/2015

 
Solution of nagarro placement questions(programming)Ankit Bharthan(BVCOE)1.
 
Take an array of 100 elements and fill it with the no 1 to 100 such that one noshould skip and one no should repeated. Find the no which is repeated and which isskipped.
 #include<stdio.h>void check(int a[]);int main() {int a[100],i;for(i=0;i<100;i++){a[i]=i;}a[68]=13;printf("done");check(a);}void check(int a[]){int b[100],c=1,k=0;for(int i=0;i<100;i++){b[i]=0;}for(int i=0;i<100;i++){if(b[a[i]]==c){b[a[i]]++;}else {b[a[i]]=c;}
 
Solution of nagarro placement questions(programming)Ankit Bharthan(BVCOE)}while(b[k]==1){k++;}for(int g=0;g<100;g++){if(b[g]==0)printf("value replaced is %d\n",g);}printf("repeated value is %d\n",k);}2.
 
find the all possible combination of digits ranging 1 to 9 whose sum is 10, no digitshud be repeated in any combination.123412713614519235283746
 #include<stdio.h>int main() {int a,b,c,d;for(a=1;a<=9;a++) {for(b=a+1;b<=9;b++) {if((a+b)==10 ) {printf("%d%d\n",a,b);}else {for(c=b+1;c<=9;c++) {
 
Solution of nagarro placement questions(programming)Ankit Bharthan(BVCOE)if(((a+b+c)==10)) {printf("%d%d%d\n",a,b,c);}else {for(d=c+1;d<=9;d++) {if(((a+b+c+d)==10) ){printf("%d%d%d%d\n",a,b,c,d);}}}}}}}return 0;}3.
 
Write a program to find out the combination of an element of each array gives aresult 0.For example:array 1: {2,1,4,7}array 1: {3,-3,-8,0}array 1: {-1,-4,-7,6}Output:pairs ={2,-8,6}{1,3,-4}{4,-3,-1}{7,0,-7}
 

Activity (18)

You've already reviewed this. Edit your review.
Akshay Kalra liked this
NagaSingaraiah liked this
Shubham Baghel added this note
Thanks Bro
Shubham Baghel liked this
sandeep055 liked this
MentaAnikumar liked this
Dibyanshu Kumar liked this
Hema Agrawal liked this
Varun1929 liked this
1 thousand reads

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->