old style C, where you can't have auto array. just that. On Thu, Aug 30, 2012 at 12:52 PM, Romil ....... <[email protected]>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 > <[email protected]>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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
