[algogeeks] doubt about macro.......

2012-02-04 Thread rahul sharma
swap(a,b,c) c t;t=a;a=b;b=t;


int main()
{
int g=1,h=2;
swap(g,h,int);
}

how the actual values are replace???
a and b are replaced with g and hactual are replace..can somebody tell
me expanded source code???

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] nyone having pointer in c ebook..plz mail me...

2012-02-04 Thread rahul sharma


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] doubt about macro.......

2012-02-04 Thread sharad dixit
Think #define as a simple text substitution macro.

Assume you are the preprocessor. Copy/paste the exact code for the macro
into the places where your program tried to use and then replace the macro
parameters with the arguments that you used to invoke the macro.

The advantage of a macro is that it can be type-neutral (also disadvantage
sometimes ), and it is inlined directly into the code, so there is not  any
function call overhead.

correct me if am wrong :D

On Sat, Feb 4, 2012 at 5:32 AM, rahul sharma rahul23111...@gmail.comwrote:

 swap(a,b,c) c t;t=a;a=b;b=t;


 int main()
 {
 int g=1,h=2;
 swap(g,h,int);
 }

 how the actual values are replace???
 a and b are replaced with g and hactual are replace..can somebody tell
 me expanded source code???

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
 Sharad Dixit
 B.Tech(IT)
 Indian Institute of Information Technology ,Allahabad
-
We aim above the mark to hit the mark.
~ Ralph Waldo Emerson

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] doubt about macro.......

2012-02-04 Thread rahul sharma
yeahjust wana cnfm that parameters are replaced actually...thnx

On Sat, Feb 4, 2012 at 4:40 PM, sharad dixit sharad.emine...@gmail.comwrote:

 Think #define as a simple text substitution macro.

 Assume you are the preprocessor. Copy/paste the exact code for the macro
 into the places where your program tried to use and then replace the macro
 parameters with the arguments that you used to invoke the macro.

 The advantage of a macro is that it can be type-neutral (also disadvantage
 sometimes ), and it is inlined directly into the code, so there is not  any
 function call overhead.

 correct me if am wrong :D

 On Sat, Feb 4, 2012 at 5:32 AM, rahul sharma rahul23111...@gmail.comwrote:

 swap(a,b,c) c t;t=a;a=b;b=t;


 int main()
 {
 int g=1,h=2;
 swap(g,h,int);
 }

 how the actual values are replace???
 a and b are replaced with g and hactual are replace..can somebody
 tell me expanded source code???

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
  Sharad Dixit
  B.Tech(IT)
  Indian Institute of Information Technology ,Allahabad

 -
 We aim above the mark to hit the mark.
 ~ Ralph Waldo Emerson

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] doubt about macro.......

2012-02-04 Thread Manni mbd
int main ()
{
int g= 1, h= 2;
 int t; t=g;g=h;h=t;
}

hope this helps

On 2/4/12, rahul sharma rahul23111...@gmail.com wrote:
 swap(a,b,c) c t;t=a;a=b;b=t;


 int main()
 {
 int g=1,h=2;
 swap(g,h,int);
 }

 how the actual values are replace???
 a and b are replaced with g and hactual are replace..can somebody tell
 me expanded source code???

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Re: doubt about macro.......

2012-02-04 Thread Dave
@Sharad: So what does swap(t,u,int) do?

Dave

On Feb 4, 5:10 am, sharad dixit sharad.emine...@gmail.com wrote:
 Think #define as a simple text substitution macro.

 Assume you are the preprocessor. Copy/paste the exact code for the macro
 into the places where your program tried to use and then replace the macro
 parameters with the arguments that you used to invoke the macro.

 The advantage of a macro is that it can be type-neutral (also disadvantage
 sometimes ), and it is inlined directly into the code, so there is not  any
 function call overhead.

 correct me if am wrong :D

 On Sat, Feb 4, 2012 at 5:32 AM, rahul sharma rahul23111...@gmail.comwrote:





  swap(a,b,c) c t;t=a;a=b;b=t;

  int main()
  {
  int g=1,h=2;
  swap(g,h,int);
  }

  how the actual values are replace???
  a and b are replaced with g and hactual are replace..can somebody tell
  me expanded source code???

   --
  You received this message because you are subscribed to the Google Groups
  Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
  algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

 --
  Sharad Dixit
  B.Tech(IT)
  Indian Institute of Information Technology ,Allahabad
 ---­--
 We aim above the mark to hit the mark.
 ~ Ralph Waldo Emerson

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: doubt about macro.......

2012-02-04 Thread sharad dixit
@dave i am not very much clear about your question .But i support my
previous comment wid
http://publib.boulder.ibm.com/infocenter/comphelp/v7v91/index.jsp?topic=%2Fcom.ibm.vacpp7a.doc%2Flanguage%2Fref%2Fclrc09cpxmac.htm



On Sat, Feb 4, 2012 at 12:25 PM, Dave dave_and_da...@juno.com wrote:

 @Sharad: So what does swap(t,u,int) do?

 Dave

 On Feb 4, 5:10 am, sharad dixit sharad.emine...@gmail.com wrote:
  Think #define as a simple text substitution macro.
 
  Assume you are the preprocessor. Copy/paste the exact code for the macro
  into the places where your program tried to use and then replace the
 macro
  parameters with the arguments that you used to invoke the macro.
 
  The advantage of a macro is that it can be type-neutral (also
 disadvantage
  sometimes ), and it is inlined directly into the code, so there is not
  any
  function call overhead.
 
  correct me if am wrong :D
 
  On Sat, Feb 4, 2012 at 5:32 AM, rahul sharma rahul23111...@gmail.com
 wrote:
 
 
 
 
 
   swap(a,b,c) c t;t=a;a=b;b=t;
 
   int main()
   {
   int g=1,h=2;
   swap(g,h,int);
   }
 
   how the actual values are replace???
   a and b are replaced with g and hactual are replace..can somebody
 tell
   me expanded source code???
 
--
   You received this message because you are subscribed to the Google
 Groups
   Algorithm Geeks group.
   To post to this group, send email to algogeeks@googlegroups.com.
   To unsubscribe from this group, send email to
   algogeeks+unsubscr...@googlegroups.com.
   For more options, visit this group at
  http://groups.google.com/group/algogeeks?hl=en.
 
  --
   Sharad Dixit
   B.Tech(IT)
   Indian Institute of Information Technology ,Allahabad
 
 ---­--
  We aim above the mark to hit the mark.
  ~ Ralph Waldo Emerson

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
 Sharad Dixit
 B.Tech(IT)
 Indian Institute of Information Technology ,Allahabad
-
We aim above the mark to hit the mark.
~ Ralph Waldo Emerson

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] doubt about macro.......

2012-02-04 Thread Varun
Yep..that's correct.
In this context, I would like to understand a little more about inline 
functions?
Other than they being a type sensitive compared to macro, what else differs 
them from macro, and does each call to inline function, does get replaced 
by its definition!.

Any link, that can give me little more insight into its intricacies, if u 
can share.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/DJUpIAVj8y0J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] AAROHAN 2012

2012-02-04 Thread Shalini Sah
Hi,

I invite you to participate in the online programming contest of Aarohan.
The link of the contest is: http://www.spoj.pl/ARHN/
  1st prize $200(1 INR)
Its a 2 hour long ACM ICPC styled contest scheduled on 8th February 2012 at
21:00(IST).

Thanks  Regards.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] nvidia qstn

2012-02-04 Thread Senthil Siva
you can use suffix tree for this kind of problem.

http://www.allisons.org/ll/AlgDS/Tree/Suffix/

Thanks  Regards,
Senthil S

On Fri, Feb 3, 2012 at 4:12 AM, Ravi Ranjan ravi.cool2...@gmail.com wrote:

 Implement a MS key suggest like tool where on typing the first letters
 will give a list of words starting with the typed text. The corpus will be
 provided as a text file. Max number of characters in a word is 10.
  - Say you type 'i', it should provide 'include | if ' as the words in the
 dropdown

 do it with minimum complexity???

 less than O(n)

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.