array shud be char * nt just char.here ur declaring a char variable
yes array is a const pointer
On Sat, Sep 3, 2011 at 6:25 PM, priya ramesh wrote:
> main(){
> char arr="algogeeks\0";
> arr++;
> }
>
> y does the compiler complain l value required in line 3.??
> arr is a pointer holding address.
@Siddhartha:
as per my knowledge,
strings are stored in code segment(its read only place) please correct me if
i m wrong.
normal variable/pointer variable stored in stack.
i dont know about array.
Thank you,
Sid.
On Sat, Sep 3, 2011 at 8:30 PM, Siddhartha Banerjee wrote:
> how does compiler in
how does compiler internally store the fact that a points to an unmodifiable
lvalue, and also it's size???
where are the normal pointer variables stored??? (stack region, heap region,
data segment???)
and the array pointer variable and it's range???
--
You received this message because you are su
you cant predect the o/p because u are assigning the memory address(16/32
bit) to the charecter variable(8bit).
Thank you,
Sid.
On Sat, Sep 3, 2011 at 7:36 PM, teja bala wrote:
> arr means the base address of the entire character array if u increase it
> i.e arr++ array reference that means a
arr means the base address of the entire character array if u increase it
i.e arr++ array reference that means arr no longer referring to the
respective character array, it 'll be lost that's y C won't allow to modify
the arr's address.
--
You received this message because you are subscribed to t
In other words, The original array identifer, and hence the pointer, is a
constant pointer.
--
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
an array variable is an *unmodified* lvalue variable
--
*UTKARSH SRIVASTAV
CSE-3
B-Tech 3rd Year
@MNNIT 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 unsubscr
main(){
char arr="algogeeks\0";
arr++;
}
y does the compiler complain l value required in line 3.??
arr is a pointer holding address. This address is an lvalue. Why is it
complaining??
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post