Thats ok.. but can u tell me its more implementations in C and OOP..?

On Sun, Sep 2, 2012 at 9:59 AM, rahul <rahulr...@gmail.com> wrote:

> i m talking in contest of question, not explaining overall picture of
> static in c,c++,java.
> On Sep 2, 2012 12:07 AM, "Puneet Gautam" <puneet.nsi...@gmail.com> wrote:
>
>> @rahul: There is something more to static than to retain old value.
>> Are u sure it is not used anywhere else for any other purpose, bcoz i
>> dont think thats the whole purpose of this keyword..
>>
>>
>>
>> On 8/30/12, rahul <rahulr...@gmail.com> wrote:
>> > static doing nothing, just to make a candidate confuse in interview.
>> > static comes into picture, when u calling same function again and again
>> and
>> > u need some variable to retain the old value, and another scenario when
>> u
>> > have to define the scope of variable.
>> >
>> >
>> > On Thu, Aug 30, 2012 at 6:02 PM, Puneet Gautam
>> > <puneet.nsi...@gmail.com>wrote:
>> >
>> >> Well, its gives error in every array assignment.."ISO forbids this type
>> >> of
>> >> assignment".
>> >> @rahul: But whats with the static here. how  does it affect any string
>> >> declared..? I couldnt get your answer ..pls explain
>> >>
>> >> On Thu, Aug 30, 2012 at 12:54 PM, rahul <rahulr...@gmail.com> wrote:
>> >>
>> >>> old style C, where you can't have auto array. just that.
>> >>>
>> >>>
>> >>> On Thu, Aug 30, 2012 at 12:52 PM, Romil .......
>> >>> <vamosro...@gmail.com>wrote:
>> >>>
>> >>>> It should give an error in the line " names[3] = names[4] "
>> >>>> These are fixed address values..you cannot change them.
>> >>>>
>> >>>>
>> >>>> On Thu, Aug 30, 2012 at 12:44 PM, Puneet Gautam
>> >>>> <puneet.nsi...@gmail.com
>> >>>> > wrote:
>> >>>>
>> >>>>> #include<iostream.h>
>> >>>>> int main()
>> >>>>> {static char names[5][20]={"pascal","ada","cobol","fortran","perl"};
>> >>>>> int i;
>> >>>>> char *t;
>> >>>>> t=names[3];
>> >>>>> names[3]=names[4];
>> >>>>> names[4]=t;
>> >>>>> for (i=0;i<=4;i++)
>> >>>>> cout<<names[i]<<endl;
>> >>>>> getchar();
>> >>>>> return 0;
>> >>>>> }
>> >>>>>
>> >>>>>
>> >>>>> Whats the importance of static keyword here..?
>> >>>>>
>> >>>>>  --
>> >>>>> 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
>> >>>> Software Engineer,
>> >>>> Winshuttle Softwares India Pvt. Ltd.
>> >>>> Chandigarh
>> >>>>
>> >>>>
>> >>>>  --
>> >>>> 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.
>>
>>  --
> 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.

Reply via email to