ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i know that this is used for muti-dimensional array . but i have a a problem that when *(array_base_address + 2 ) is processed inside char * ( *(array_base_address + 2 ) + 3 ) , why "*(array_base_address + 2 )" is not pointing to s in "sona"
printf("%c",*(*(array_base_address+2)+2)) in this line , when ever *(array_base_address+2) is processed , so after processing why this why sona term is not taking the place of *(array_base_address+2)
like
printf("%c",*(*(array_base_address+2)+2)) , so after processing *(array_base_address+2) , why it is not acting like *(sona+2) .
because *(array_base_address+2) indicates the base address of 3rd row in the array !
Sir nevemteve & gcchen
printf("%c",*(*(array_base_address+2)+2));
think about this line , we have base address array_base_address now we are adding +2 in it means now we are at 3rd row of the array , and after it , we are saying *(array_base_address+2) , it means we are dealing with sona , now we are adding +2 in sona we can say like this , *(sona+2)
.....but this is wrong , because it is multidimensional array , i know it , but why this is wrong !
Last edited by tushar_pandey; 07-30-2012 at 05:48 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.