Re: [algogeeks] Re: algo qstn

2012-01-18 Thread Rohit Srivastava
@ jaimedp: logic?

On Wed, Jan 18, 2012 at 4:11 AM, Don  wrote:

> +1 Jaimedp
>
> On Jan 17, 1:05 pm, jaimedp  wrote:
> > 120
> >
> > On Jan 17, 5:59 am, Umer Farooq  wrote:
> >
> >
> >
> > > 0
> >
> > > On 1/16/12, Ravi Ranjan  wrote:
> >
> > > > An ant moves on a regular grid of squares that are coloured either
> black or
> > > > white.
> > > > The ant is always oriented in one of the cardinal directions (left,
> right,
> > > > up or down) and moves from square to adjacent square according to the
> > > > following rules:
> > > > - if it is on a black square, it flips the color of the square to
> white,
> > > > rotates 90 degrees counterclockwise and moves forward one square.
> > > > - if it is on a white square, it flips the color of the square to
> black,
> > > > rotates 90 degrees clockwise and moves forward one square.
> >
> > > > Starting with a grid that is entirely white, how many squares are
> black
> > > > after 1018 moves of the ant?
> >
> > > > source
> >
> > > >http://projecteuler.net/problem=349
> >
> > > > --
> > > > 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.
> >
> > > --
> > > Umer- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> 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] A logical Question

2011-10-29 Thread Rohit Srivastava
remains same

On Sat, Oct 29, 2011 at 12:21 PM, praveen raj  wrote:

> amount displaced by (boat +man + suitcase) = amount displaced by
> (boat+man)  + amount displaced by suitcase
>
> therefore no change of level...
>
> With regards,
>
> Praveen Raj
> DCE-IT 3rd yr
> 735993
> praveen0...@gmail.com
>
>
>
>
> On Thu, Sep 15, 2011 at 4:24 PM, hary rathor wrote:
>
>> no increase or no decrease
>>
>> --
>> 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.
>

-- 
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: Syllogism

2011-08-22 Thread Rohit Srivastava
no
some girls may not be beautiful or all of them may be beautiful
based on your premise the conclusion is incorrect since you havent spoken
about the rest of the girls so you dont know nething about them

On Mon, Aug 22, 2011 at 1:12 PM, Apoorve Mohan wrote:

> U cannot say that conclusion is true...it may or may not be true...
>
>
> On Mon, Aug 22, 2011 at 1:03 PM, tanuj chawla wrote:
>
>> conclusion is not true...
>> may be all the girls are beautiful..
>>
>> On Sun, Aug 21, 2011 at 3:37 AM, Rahul  wrote:
>>
>>> http://philosophy.lander.edu/logic/syll_prob.html
>>> Rahul
>>>
>>>
>>> On Sun, Aug 21, 2011 at 6:16 AM, Dave  wrote:
>>>
 @Geek_one: In fact, the statement "All girls are beautiful" does not
 imply that "Some girls are beautiful" unless we know that the set of
 girls is non-empty. For the statement "All girls are beautiful" is
 true if there are no girls. But "Some girls are beautiful" asserts the
 existence of at least one girl who is beautiful.

 Dave

 On Aug 20, 3:08 am, geek_one  wrote:
 > i have a doubt,
 > i think after seeing some girls we can make the assumption that some
 are
 > beautiful.
 > since we have not come across with all the girls, so can anyone can't
 say
 > that some are not beautiful.

 --
 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.
>>>
>>
>>  --
>> 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.
>>
>
>
>
> --
> regards
>
> Apoorve Mohan
>
>  --
> 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] an amazing amazon question!

2011-08-17 Thread Rohit Srivastava
logic plz?

On Wed, Aug 17, 2011 at 10:35 PM, sagar pareek wrote:

> 16, 61, 106  average speed is 45 miles/hour
>
>
> On Wed, Aug 17, 2011 at 10:28 PM, priya ramesh <
> love.for.programm...@gmail.com> wrote:
>
>> A car is traveling at a uniform speed.The driver sees a milestone showing
>> a 2-digit number. After traveling for an hour the driver sees another
>> milestone with the same digits in reverse order.After another hour the
>> driver sees another milestone containing the same two digits. What is the
>> average speed of the driver?
>>
>> --
>> 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.
>>
>
>
>
> --
> **Regards
> SAGAR PAREEK
> COMPUTER SCIENCE AND ENGINEERING
> NIT ALLAHABAD
>
>  --
> 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] De shaw ques!

2011-08-17 Thread Rohit Srivastava
+1 to nitin

On Wed, Aug 17, 2011 at 6:02 PM, Romil ...  wrote:

> People this is not the way to approach this one. This question seems to be
> unfair. Take the number to be 1939 which also leaves 69 as the remainder
> when divided by 935 but when it is divided by 38, the remainder is only 1.
> There is definitely some mistake. Also there doesn't seem to be a
> mathematical way to solve this.
>
>
> On Wed, Aug 17, 2011 at 5:58 PM, priya ramesh <
> love.for.programm...@gmail.com> wrote:
>
>> i solved it the same way you solved it. Took the same exmpl too :)
>>
>> --
>> 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.
>>
>
>
>
> --
> Romil
>
>
>  --
> 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] GS apti ques!

2011-08-17 Thread Rohit Srivastava
0.788

On Wed, Aug 17, 2011 at 5:23 PM, priya ramesh <
love.for.programm...@gmail.com> wrote:

> A mistake from my side as well!
> Got 78.8% :)
>
>  --
> 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] Re: Number theory

2011-08-17 Thread Rohit Srivastava
+1 to nitin

On Wed, Aug 17, 2011 at 2:48 PM, Vijay Kansal wrote:

> my bad 2^(n-1)...
>
> On Aug 17, 2:17 pm, Vijay Kansal  wrote:
> > @nitin it must be 2^n i think
> >
> > On Aug 17, 3:48 am, Bharat Kul Ratan  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > It might be useful:
> http://www.artofproblemsolving.com/Wiki/index.php/Partition_%28combin...
>
> --
> 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] String Doubt

2011-08-13 Thread Rohit Srivastava
my bad only 3,4

On Sat, Aug 13, 2011 at 7:41 PM, rajeev bharshetty wrote:

> 3,4
>
>
> On Sat, Aug 13, 2011 at 7:39 PM, Raman  wrote:
>
>> In statement 2, isn't p pointing to const string, as we cannot modify the
>> characters of the string.
>>
>> --
>> 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/-/FU-nrcTBpCoJ.
>>
>> 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.
>>
>
>
>
> --
> Regards
> Rajeev N B 
>
> "*Winners Don't do Different things , they do things Differently"*
>
>  --
> 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] String Doubt

2011-08-13 Thread Rohit Srivastava
also 3,4

On Sat, Aug 13, 2011 at 7:30 PM, Rohit Srivastava wrote:

> 2.
>
>
> On Sat, Aug 13, 2011 at 7:24 PM, Raman  wrote:
>
>> Which of the following statements are correct about the below
>> declarations?
>> *char *p = "Sanjay";
>> char a[] = "Sanjay";* 1: There is no difference in the declarations and
>> both serve the same purpose. 2: *p* is a non-const pointer pointing to a
>> non-const string, whereas *a* is a const pointer pointing to a non-const
>> string. 3: The pointer *p* can be modified to point to another string,
>> whereas the individual characters within array *a* can be changed. 4: In
>> both cases the *'\0'* will be added at the end of the string "Sanjay".
>>
>> --
>> 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/-/7CewyURYV1AJ.
>> 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] String Doubt

2011-08-13 Thread Rohit Srivastava
2.

On Sat, Aug 13, 2011 at 7:24 PM, Raman  wrote:

> Which of the following statements are correct about the below declarations?
> *char *p = "Sanjay";
> char a[] = "Sanjay";*1:There is no difference in the declarations and both
> serve the same purpose.2:*p* is a non-const pointer pointing to a
> non-const string, whereas *a* is a const pointer pointing to a non-const
> string.3:The pointer *p* can be modified to point to another string,
> whereas the individual characters within array *a* can be changed.4:In
> both cases the *'\0'* will be added at the end of the string "Sanjay".
>
> --
> 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/-/7CewyURYV1AJ.
> 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] c question!

2011-08-09 Thread Rohit Srivastava
dont use *h just use h

On Tue, Aug 9, 2011 at 8:31 PM, siddharth srivastava wrote:

> Hi
>
> On 9 August 2011 20:26, programming love 
> wrote:
>
>>   #includetypedef struct {char * a;
>> }*nodeptr;
>> main(){nodeptr *h;h->a="programming";printf("hi %s\n", h->a);}
>>
>>
>> this gives an error. Please explain the concept behind this.
>>
>>
>
> You have used typedef incorrectly
>
>>
>>  --
>> 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.
>>
>
>
>
> --
> Regards
> Siddharth Srivastava
>
>
>
>  --
> 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] c question!

2011-08-09 Thread Rohit Srivastava
yep it will !!
any ways nodeptr is another name for pointer to the same structure so you
dont need to write struct *nodeptr
you can simply write nodeptr *p(say) to declare pointer to the structure

On Tue, Aug 9, 2011 at 8:09 PM, rohit jangid  wrote:

> it will give error in line 3 because nodeptr is undefined till that point..
>
> On Aug 9, 2011 8:03 PM, "programming love" 
> wrote:
>
> --
> 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] MS question

2011-08-09 Thread Rohit Srivastava
google on RLE (run length encoding) its almost similar!!

On Tue, Aug 9, 2011 at 6:46 PM, ankit sambyal wrote:

> @raghavan: ur approach uses O(n) space
>
> --
> 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] Re: Doubts

2011-08-09 Thread Rohit Srivastava
@aditi since in the hierarchy m1 comes first so if it is a hit then we dont
need to check m2 but in case of a miss 0.03*2 seconds are wasted while
searching in m1 then that value is looked for in m2
so i suppose the best answer is given by rohit jain. unless there is some
missing data

On Tue, Aug 9, 2011 at 5:41 PM, aditi garg wrote:

> @Rohit: we wont include the miss time fr M2 then?
>
>
> On Tue, Aug 9, 2011 at 5:36 PM, rohit jain wrote:
>
>> @aditi
>>
>> For the first question.
>> The answer will be ((0.97 *2) + (0.03*2) +(0.03*100)) i.e 5 ns.
>> The reason is that cache is accessed in the case of miss as well, so
>> we need to include that time as well.
>>
>> --
>> 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.
>>
>>
>
>
> --
> Aditi Garg
> Undergraduate Student
> Electronics & Communication Divison
> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
> Sector 3, Dwarka
> New Delhi
>
>
>  --
> 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] problem regarding output??

2011-08-09 Thread Rohit Srivastava
typecast only temporarily changes the pointer type of LHS but cannot change
that of RHS or even LHS permanently

On Tue, Aug 9, 2011 at 5:36 PM, ankit sambyal wrote:

> The typecasting tells the compiler that the void pointer is now pointing to
> an integer and when we use this pointer to access the integer it takes value
> from 4 bytes. But when we try to increment that pointer, it will point to
> the next byte.  Try taking k as pointer to double instead of void, u will c
> the same result.
>
> --
> 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] Doubts

2011-08-09 Thread Rohit Srivastava
yup !!! it will increase the avg access time

On Tue, Aug 9, 2011 at 1:39 PM, aditi garg wrote:

> @Rohit:No...i directly copy pasted the ques...nothing else mentioned...and
> what if thr ws sm miss penalty?what wud be the change in soution?
>
>
> On Tue, Aug 9, 2011 at 1:37 PM, Rohit Srivastava 
> wrote:
>
>> @aditi did they mention any thing about miss penalty also in the question
>> ??
>>
>>
>> On Tue, Aug 9, 2011 at 11:48 AM, aditi gayrg 
>> wrote:
>>
>>> @aditya and dipankar: the ans given ws 500ns that is why i posted dis
>>> ques...i ws getting the same ans...
>>>
>>>
>>> On Tue, Aug 9, 2011 at 9:45 AM, ankit sambyal wrote:
>>>
>>>> @aditya : can u explain how u got c part as the answer for question 2
>>>>
>>>> --
>>>> 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.
>>>>
>>>
>>>
>>>
>>> --
>>> Aditi Garg
>>> Undergraduate Student
>>> Electronics & Communication Divison
>>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>>> Sector 3, Dwarka
>>> New Delhi
>>>
>>>
>>>  --
>>> 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.
>>
>
>
>
> --
> Aditi Garg
> Undergraduate Student
> Electronics & Communication Divison
> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
> Sector 3, Dwarka
> New Delhi
>
>
>  --
> 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] Doubts

2011-08-09 Thread Rohit Srivastava
@aditi did they mention any thing about miss penalty also in the question ??

On Tue, Aug 9, 2011 at 11:48 AM, aditi garg wrote:

> @aditya and dipankar: the ans given ws 500ns that is why i posted dis
> ques...i ws getting the same ans...
>
>
> On Tue, Aug 9, 2011 at 9:45 AM, ankit sambyal wrote:
>
>> @aditya : can u explain how u got c part as the answer for question 2
>>
>> --
>> 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.
>>
>
>
>
> --
> Aditi Garg
> Undergraduate Student
> Electronics & Communication Divison
> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
> Sector 3, Dwarka
> New Delhi
>
>
>  --
> 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] output help

2011-08-09 Thread Rohit Srivastava
hey guys thanks got it!!


On Tue, Aug 9, 2011 at 12:49 PM, sanjay ahuja wrote:

> Int bit3:4 will be read as lower order 4 bits of bit3 and this will be
> treated as int (signed). Thus lower order bit of bit3 which is 2, are
> 0010 which is 2
> try with
> 1) int bit3:2, output will be -2
> 2) unsigned int bit3:2, output will be 2.
>
> I hope it is cleared now
>
> On 8/9/11, Rohit Srivastava  wrote:
> > #include
> > #include
> >
> > int main()
> > {
> > struct value
> > {
> > int bit1:1;
> > int bit3:4;
> > int bit4:4;
> > }bit={1,2,2};
> > printf("%d %d %d\n",bit.bit1,bit.bit3,bit.bit4);
> > getche();
> > return 0;
> > }
> >  the above code gives output : -1 2 2
> > any idea why???
> >
> > --
> > 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.
> >
> >
>
> --
> Sent from my mobile device
>
> Sanjay Ahuja,
> Analyst, Financing Prime Brokerage
> Nomura Securities India Pvt. Ltd
>
> --
> 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] output help

2011-08-08 Thread Rohit Srivastava
#include
#include

int main()
{
struct value
{
int bit1:1;
int bit3:4;
int bit4:4;
}bit={1,2,2};
printf("%d %d %d\n",bit.bit1,bit.bit3,bit.bit4);
getche();
return 0;
}
 the above code gives output : -1 2 2
any idea why???

-- 
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] Question

2011-08-05 Thread Rohit Srivastava
try using dev or any new 32bit compiler it wont give that error!!!
or try using this
void linkfloat(void)
{
 float a=0,*b=&a;
 a=*b;
}
this code forces the emulator to be linked
On Fri, Aug 5, 2011 at 7:38 PM, Vijay Khandar wrote:

> Yes correct,  In m using very old compiler Turbo C++
>
>
> On Fri, Aug 5, 2011 at 7:34 PM, Rohit Srivastava 
> wrote:
>
>> you might get error: floating pointing formats not linked!!
>> but thats obsolete! I don't compiler these days will give such an error
>> otherwise code written by Dipankar will solve ur problem if u r unable to
>> take multi-word input
>> On Fri, Aug 5, 2011 at 7:24 PM, Dipankar Patro wrote:
>>
>>> try doing this way and tell if the program is working properly now:
>>> for (i=0; i<3; i++)
>>> {
>>>  scanf("%[^\n]", e[i].name);
>>>  scanf("%f", e[i].sal);
>>> }
>>>
>>> There is always some problem in string input using %s, don't really know
>>> why though deeply.
>>>
>>> On 5 August 2011 17:48, Vijay Khandar  wrote:
>>>
>>>> But program is not working properly...
>>>>
>>>>
>>>> On Fri, Aug 5, 2011 at 5:44 PM, Nikhil Gupta >>> > wrote:
>>>>
>>>>> Couldn't find any error.
>>>>>
>>>>> On Fri, Aug 5, 2011 at 5:38 PM, Vijay Khandar >>>> > wrote:
>>>>>
>>>>>> What errors are you likely to get when you run the following program?
>>>>>>
>>>>>> #include
>>>>>> #include
>>>>>> #include
>>>>>> void main()
>>>>>> {
>>>>>> clrscr();
>>>>>> struct emp
>>>>>> {
>>>>>> char name[20];
>>>>>> float sal;
>>>>>> };
>>>>>> struct emp e[10];
>>>>>> int i;
>>>>>> for(i=0;i<=3;i++)
>>>>>> scanf("%s %f",e[i].name,&e[i].sal);
>>>>>> getch();
>>>>>> }
>>>>>>
>>>>>> Plz Explain anyone.
>>>>>>
>>>>>> Vijay..
>>>>>>
>>>>>> --
>>>>>> 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.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Nikhil Gupta
>>>>> Senior Co-ordinator, Publicity
>>>>> CSI, NSIT Students' Branch
>>>>> NSIT, New Delhi, India
>>>>>
>>>>>  --
>>>>> 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.
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> ___
>>>
>>> Please do not print this e-mail until urgent requirement. Go Green!!
>>> Save Papers <=> Save Trees
>>>
>>> --
>>> 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.
>>
>
>  --
> 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] Question

2011-08-05 Thread Rohit Srivastava
which compiler are u using
?

On Fri, Aug 5, 2011 at 7:29 PM, Vijay Khandar wrote:

> I include this fn linkfloat(), Now my program working properlybut
> why we have to include this fn externally plz explain.
>
>
> On Fri, Aug 5, 2011 at 6:07 PM, SANDEEP CHUGH wrote:
>
>> INCLUDE THIS FUNCTION
>> linkfloat( )
>> {
>> float a = , *b ;
>> b = &a ;  /* cause emulator to be linked */
>> a = *b ;/* suppress the warning - variable not used */
>> };
>>
>> On Fri, Aug 5, 2011 at 6:04 PM, Vijay Khandar wrote:
>>
>>> But program is not giving the o/p.
>>> I have taken one printf statement same as scanf..and scanf() taking
>>> i/p but prinf() not giving o/p...
>>>
>>>
>>> On Fri, Aug 5, 2011 at 5:53 PM, Nikhil Gupta 
>>> wrote:
>>>
 http://www.ideone.com/ZIibX

 The changes I have done in the program are to make it compatible to gcc
 compiler.
 Check the statement in the bottom of the page.

 On Fri, Aug 5, 2011 at 5:46 PM, Vijay Khandar 
 wrote:

> What errors are you likely to get when you run the following program?
>
> #include
> #include
> #include
> void main()
> {
> clrscr();
> struct emp
> {
> char name[20];
> float sal;
> };
> struct emp e[10];
> int i;
> for(i=0;i<=3;i++)
> scanf("%s %f",e[i].name,&e[i].sal);
> getch();
> }
>
> A)floating point format not linked
> B)Suspicious pointer conversion
> C)Cannot use scanf() for structures
> D)Strings cannot be nested inside structures
>
> Plz Explain anyone.
>
> Vijay.
>
> --
> 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.
>
>


 --
 Nikhil Gupta
 Senior Co-ordinator, Publicity
 CSI, NSIT Students' Branch
 NSIT, New Delhi, India

  --
 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.
>>>
>>
>>  --
>> 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.
>

-- 
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] Question

2011-08-05 Thread Rohit Srivastava
you might get error: floating pointing formats not linked!!
but thats obsolete! I don't compiler these days will give such an error
otherwise code written by Dipankar will solve ur problem if u r unable to
take multi-word input
On Fri, Aug 5, 2011 at 7:24 PM, Dipankar Patro  wrote:

> try doing this way and tell if the program is working properly now:
> for (i=0; i<3; i++)
> {
>  scanf("%[^\n]", e[i].name);
>  scanf("%f", e[i].sal);
> }
>
> There is always some problem in string input using %s, don't really know
> why though deeply.
>
> On 5 August 2011 17:48, Vijay Khandar  wrote:
>
>> But program is not working properly...
>>
>>
>> On Fri, Aug 5, 2011 at 5:44 PM, Nikhil Gupta 
>> wrote:
>>
>>> Couldn't find any error.
>>>
>>> On Fri, Aug 5, 2011 at 5:38 PM, Vijay Khandar 
>>> wrote:
>>>
 What errors are you likely to get when you run the following program?

 #include
 #include
 #include
 void main()
 {
 clrscr();
 struct emp
 {
 char name[20];
 float sal;
 };
 struct emp e[10];
 int i;
 for(i=0;i<=3;i++)
 scanf("%s %f",e[i].name,&e[i].sal);
 getch();
 }

 Plz Explain anyone.

 Vijay..

 --
 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.


>>>
>>>
>>> --
>>> Nikhil Gupta
>>> Senior Co-ordinator, Publicity
>>> CSI, NSIT Students' Branch
>>> NSIT, New Delhi, India
>>>
>>>  --
>>> 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.
>>
>
>
>
> --
>
> ___
>
> Please do not print this e-mail until urgent requirement. Go Green!!
> Save Papers <=> Save Trees
>
> --
> 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] Re: self referential struct. Contd.

2011-07-29 Thread Rohit Srivastava
padding based on the bit interleaving(low order) which is basically hardware
dependent.

On Fri, Jul 29, 2011 at 10:10 PM, Puneet Gautam wrote:

> Thanks guys...so much...!!
>
> On 7/29/11, nullpointer  wrote:
> > #include
> > #include
> > struc MyStructA {
> >
> >  char a;
> >  char b;
> >  int c;
> > };
> >
> > struct MyStructB {
> >  char a;
> >  int c;
> >  char b;
> > };
> >
> > int main(void) {
> >
> >  struct MyStructA A;
> >  struct MyStructB B;
> >
> > int sizeA = sizeof(struct MyStructA);
> >  int sizeB = sizeof(struct MyStructB);
> >  return 0;
> >
> > }
> >
> > OUTPUT IS
> > A = 8
> > B = 12
> > Structure padding is done to try and make sure that variables start in
> > memory at addresses that are a multiple of their size.
> > This is more efficient at hardware level (needs less cpu ticks to read
> > or write variables) and in some platforms this is mandatory, though
> > not on i386. There are CPU's that can only handle double precision
> > floats if they are aligned on addresses that are a multiople of 8.
> >
> >
> > In this struct:
> > struct MyStructA {
> >
> >  char a;
> >  char b;
> > int c;
> > };
> > the beginning of the struct is to be assumed at 0 (I'l explain later)
> > a is 1 byte so it needs no padding in front of it.
> > the same goes for b.
> > but c is 4 bytes. it should be placed at an address boundary that is a
> > multiple of 4, so the compiler adds 2 dummy bytes in front of it.
> > These 2 bytes change the size from 6 to 8.
> > Now in this struct:
> > struct MyStructB {
> >  char a;
> >  int c;
> >  char b;
> > };
> >
> > a starts on 0, so no need for padding.
> > c needs 3 bytes in front of it, and b needs no padding.
> > this would bring the struct size to 9. HOWEVER, suppose that you place
> > 2 of those structs in an array, the address rules for the second
> > struct in the array are the same as for the first struct.
> > If that second struct would start at byte 10, this would not be true
> > so the compiler also inserts some padding at the end of the structure
> > so that the next struct after it starts at a multiple of the size of
> > its largest member.
> >
> >
> >
> >
> > On Jul 29, 3:36 pm, Arun Vishwanathan  wrote:
> >> @puneet : no , in this case since 4 bytes will be used for int a and int
> c
> >> and then 1 byte for char b with 3 padded bytes next..it wud be the same
> >> here
> >>
> >> On Fri, Jul 29, 2011 at 12:11 PM, Puneet Gautam
> >> wrote:
> >>
> >>
> >>
> >> > @nikhil: If i declare "Char b" after "int c".., would there be any
> >> > difference...?
> >>
> >> > On 7/28/11, Nikhil Gupta  wrote:
> >> > > Here's another example.
> >>
> >> > > struct example
> >> > > {
> >> > > int a;
> >> > > char b;
> >> > > int c;
> >> > > }
> >>
> >> > > Now if a variable of type example is declared then
> >> > > (considering base address as 2000)
> >> > > a gets : 2000 to 2003
> >> > > b gets : 2004
> >> > > c gets : 2005 to 2008 ? NO
> >>
> >> > > It gets 2008 to 2011. The bytes from 2005 to 2007 (3 bytes) are
> padded
> >> > > in
> >> > > this case.
> >>
> >> > > On Thu, Jul 28, 2011 at 12:18 AM, Aman Goyal <
> aman.goya...@gmail.com>
> >> > wrote:
> >>
> >> > >> yes this will be the case.
> >>
> >> > >> On Wed, Jul 27, 2011 at 11:35 PM, Puneet Gautam
> >> > >> wrote:
> >>
> >> > >>> @nikhil:So what u mean is that if i have:
> >>
> >> > >>> struct{
> >> > >>> int a;
> >> > >>> char b[5];
> >> > >>> };
> >>
> >> > >>> the size of this struct's node will be 12 not 9.., to make it a
> >> > multiple
> >> > >>> of 4??
> >>
> >> > >>> On 7/26/11, Nikhil Gupta  wrote:
> >> > >>> > Padding is not a topic of self referential structure.
> >>
> >> > >>> > Padding means that extra spaces of memory are used by the
> compiler
> >> > >>> > to
> >> > >>> > allocate memory. This is done to have the memory address as a
> >> > multiple
> >> > >>> of
> >> > >>> > the size of the variable. This speeds up the processing of these
> >> > >>> variables
> >> > >>> > by the compiler.
> >>
> >> > >>> > On Tue, Jul 26, 2011 at 8:09 PM, Puneet Gautam
> >> > >>> > wrote:
> >>
> >> > >>> >> what is meant by padding in self_referenced structure?
> >> > >>> >> Is it always necessary?
> >>
> >> > >>> >> --
> >> > >>> >> 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.
> >>
> >> > >>> > --
> >> > >>> > Nikhil Gupta
> >> > >>> > Senior Co-ordinator, Publicity
> >> > >>> > CSI, NSIT Students' Branch
> >> > >>> > NSIT, New Delhi, India
> >>
> >> > >>> > --
> >> > >>> > You received this message because you are subscribed to the
> Google
> >> > >>> Groups
> >> > >>> > "Algorithm Geeks" group.
> >> > >>> > To post to this

Re: [algogeeks] Re: C output

2011-07-28 Thread Rohit Srivastava
no error in dev c++.

On Thu, Jul 28, 2011 at 2:43 PM, Piyush Kapoor  wrote:

> It is not showing compiler error on Codeblocks on my machine.
>
>
> On Thu, Jul 28, 2011 at 2:26 PM, prabhat  wrote:
>
>> i think there will be warning due to inner structure is not declaring
>> variable.
>> Inner structure must be like:
>> struct yy
>> {
>> char s;
>>struct xx *p;
>> }a;
>>
>> On Jul 27, 9:22 pm, Aman Goyal  wrote:
>> > #include‹stdio.h›
>> > main()
>> > {
>> > struct xx
>> > {
>> > int x;
>> > struct yy
>> > {
>> > char s;
>> > struct xx *p;
>> >
>> > };
>> > struct yy *q;
>> > };
>> > }
>> >
>> > ouput: compiler error.
>> >
>> > Any logical reasons?
>>
>> --
>> 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.
>>
>>
>
>
> --
> *Regards,*
> *Piyush Kapoor,*
> *CSE-IT-BHU*
>
>  --
> 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.