actually the address of name is constant and that get modifed , so
thats not possible once name is converted to pointer then this assignment
is posible .

On Mon, Jun 4, 2012 at 10:51 AM, Hassan Monfared <[email protected]>wrote:

> you can't assign  value into names[i]!
>
>
> On Mon, Jun 4, 2012 at 3:12 AM, mahendra sengar <[email protected]>wrote:
>
>>  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++)
>> printf("%s",names[i]);
>> }
>>
>> --
>> 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.
>



-- 
Cheers,

Nishant Pandey |Specialist Tools Development  |
[email protected]<[email protected]> |
+91-9911258345

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

Reply via email to