Re: [algogeeks] SQL Question

2011-08-28 Thread Someshwar Chandrasekaran
On Sun, Aug 28, 2011 at 5:17 PM, ravi maggon maggonr...@gmail.com wrote: SELECT DISTINCT(NAME) FROM TABLE1; SELECT name FROM table1 GROUP BY name; Regards, B.C.Someshwar -- 'Talk sense to a fool and he calls you foolish.' - Euripides My Blog:  somsekaran.wordpress.com -- You received

Re: [algogeeks]

2011-07-31 Thread Someshwar Chandrasekaran
On Sun, Jul 31, 2011 at 2:20 PM, priyanka raju priyark...@gmail.com wrote: write a c program to print the following        *    *       * *      *       *     *      *         * What complexity is expected? Regards, B.C.Someshwar -- 'Talk sense to a fool and he calls you foolish.' -

Re: [algogeeks] random generation

2011-07-31 Thread Someshwar Chandrasekaran
On Sun, Jul 31, 2011 at 3:09 PM, Puneet Gautam puneet.nsi...@gmail.com wrote: Can we write a code to generate random numbers without using rand function..? Pls help me on this!! How about operating on some garbage value? Regards, B.C.Someshwar -- 'Talk sense to a fool and he calls you

Re: [algogeeks] C output.

2011-07-26 Thread Someshwar Chandrasekaran
On Tue, Jul 26, 2011 at 2:56 PM, Ankur Khurana ankur.kkhur...@gmail.com wrote: but in precedence order || . Checked the same in dennis ricthie. and || both have the same precedence. There is a shorthand pattern of evaluation for the expressions. learning that will help Regards, B.C.Someshwar

Re: [algogeeks] AMAZON Q

2011-07-26 Thread Someshwar Chandrasekaran
On Tue, Jul 26, 2011 at 7:18 PM, Piyush Sinha ecstasy.piy...@gmail.com wrote: You have an array like ar[]= {1,3,2,4,5,4,2}. You need to create another array ar_low[] such that ar_low[i] = number of elements lower than or equal to ar[i] in ar[i+1:n-1]. So the output of above should be

Re: [algogeeks] C Output

2011-07-25 Thread Someshwar Chandrasekaran
On Mon, Jul 25, 2011 at 8:20 PM, swetha rahul swetharahu...@gmail.com wrote: int main() {     int a[5]={1,2,3,4,5};     int *ptr=a;     printf(%d,*(ptr));     getch(); } Then why this prints 1.. ?? Here, ptr variable gets the starting address of the array 'a'. the starting address by

Re: [algogeeks] preprocessor directives

2011-07-25 Thread Someshwar Chandrasekaran
On Mon, Jul 25, 2011 at 8:22 PM, Arshad Alam alam3...@gmail.com wrote: what would be the output of the below program give little explanations #includeconio.h #includestdio.h #define PRODUCT(x) (x*x) void main() {     int i=3,j,k;     j=PRODUCT(i++);     k=PRODUCT(++i);     printf(\n%d

Re: [algogeeks] Poison River

2011-07-25 Thread Someshwar Chandrasekaran
On Tue, Jul 26, 2011 at 3:19 AM, Don dondod...@gmail.com wrote: How can the conditions be met for N=4? N=6? N=7? I believe this question cannot be solved for any values other than three. The condition of wearing it only once makes it tricky. Regards, B.C.Someshwar -- 'Talk sense to a fool