Re: [algogeeks] Adobe written test question

2012-10-25 Thread kumar anurag
in fy2 , the variable arr[10] has not been declared and hence it should display error message while compiling Thanks Kumar Anurag On Wed, Oct 24, 2012 at 11:06 PM, rahul sharma rahul23111...@gmail.comwrote: int arr[10] // in fyl 1 now in fyl 2 extern int *arr void foo() { arr[0]=10; }

Re: [algogeeks] Adobe written test question

2012-10-25 Thread Nishant Pandey
i think arr[10] and int *arr are two different declaration when ,when compiler tried to link with the memory of int arr[10] it could nt find it , as u have declraed it to be integer type pointer , and in file 1 it could find integer pointer . On Wed, Oct 24, 2012 at 11:06 PM, rahul sharma

Re: [algogeeks] Adobe written test question

2012-10-25 Thread rahul sharma
@all.can u provide me working code for use of extern..whenever i try to use..linker error comes...like any simple codefor use of extern On Thu, Oct 25, 2012 at 9:49 AM, Nishant Pandey nishant.bits.me...@gmail.com wrote: i think arr[10] and int *arr are two different declaration when ,when

[algogeeks] Adobe written test question

2012-10-24 Thread rahul sharma
int arr[10] // in fyl 1 now in fyl 2 extern int *arr void foo() { arr[0]=10; } what kind of problem can be there?in what condition and y? plz comment -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-23 Thread Rahul Kumar Patle
@dave sir: i understand your point, here my solution is only limited to hold the divisor in range of integer.. On Sat, Sep 22, 2012 at 1:41 AM, Dave dave_and_da...@juno.com wrote: @Rahul: What does this print for n = 193? Dave On Friday, September 21, 2012 12:14:18 AM UTC-5, Rahul Kumar

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-21 Thread Dave
@Navin: It means that given a positive integer n whose decimal representation ends in 3, find a multiple, m*n, which is written solely with the digit 1. E.g., 3: 37 * 3 = 111; 13: 8547 * 13 = 111,111. Dave On Thursday, September 20, 2012 11:56:08 PM UTC-5, Navin Kumar wrote: @all: Please

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-21 Thread Navin Kumar
@Dave sir: Thanx for reply. your solution gives the exact multiple like 37 for 3, 8547 for 13. In the question i think we have to print the number which is 13x8547 which will be very large (out of integer range).In that case we have to store result in string. On Fri, Sep 21, 2012 at 12:09

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-21 Thread Dave
@Navin: No problem. Just print a 1 instead of a quotient digit. That makes the code even simpler, like this: int n=the number that ends with 3; int divisor=1; printf(1); while( divisor != 0 ) { printf(1); divisor = 10 * (divisor % n) + 1; } printf(\n); Dave On Friday, September 21,

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-21 Thread Rahul Kumar Patle
here is my code: main() { int n=13; int divisor=1; int temp; while( divisor n ) divisor = 10 * divisor + 1; printf(%d\n , divisor); temp = divisor; while(n) { if(temp%n == 0) break; temp = 10 * (temp % n) + 1; divisor = 10 * divisor + 1; while( temp n ) {

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-21 Thread Dave
I thought about it some more, and realize that my code wasn't correct. Try this: int n = the number that ends with 3; // e.g., int n = 13; int d = 1; while( d % n != 0 ) { printf(1); d = 10 * (d % n) + 1; } printf(1\n); On Friday, September 21, 2012 11:07:29 AM UTC-5, Dave wrote:

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-21 Thread Dave
@Rahul: What does this print for n = 193? Dave On Friday, September 21, 2012 12:14:18 AM UTC-5, Rahul Kumar Patle wrote: here is my code: main() { int n=13; int divisor=1; int temp; while( divisor n ) divisor = 10 * divisor + 1; printf(%d\n , divisor); temp = divisor; while(n)

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-20 Thread bharat b
what is the solution(not brute force) for 8th question ? On Fri, Sep 14, 2012 at 5:19 PM, Bhupendra Dubey bhupendra@gmail.comwrote: Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI viharri@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-20 Thread Dave
@Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the quotient digit by digit until you bring down a zero. It could look something like this: int n=the number that ends with 3; int divisor=1; while( divisor n ) divisor

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-20 Thread Navin Kumar
@all: Please explain question number 8. I am not getting the question exactly what it says ? On Fri, Sep 21, 2012 at 9:30 AM, Dave dave_and_da...@juno.com wrote: @Bharat: Simulate long division, dividing a number ...1 by the number. You can do this one digit at a time, printing the

Re: [algogeeks] Adobe Written Test - 25 SEPT 2010

2012-09-14 Thread Bhupendra Dubey
Which edition of barron? On Wed, Sep 28, 2011 at 6:05 PM, VIHARRI viharri@gmail.com wrote: 1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes

[algogeeks] Adobe Written Test - 25 SEPT 2010

2011-09-28 Thread VIHARRI
1. Java uses stack for byte code in JVM - each instruction is of one byte, so how many such instructions are possible in an operating system. 2. Three processes p1, p2, p3, p4 - each have sizes 1GB, 1.2GB, 2GB, 1GB. And each processes is executed as a time sharing fashion. Will they be executed

[algogeeks] Adobe written test

2011-09-07 Thread pavan kumar
Can any one pls post the questions that were asked in Adobe written test ??? And also pattern of the paper -- Regards: --- K Pavan Kumar Computer Science Engg. 2nd Mtech, IIT Madras. -- You received this message because you are subscribed to the Google Groups