| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 27 Mar 2008 18:03:27 IST
|
|
|
sneha and anu, both of u r rite.
|
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28 Mar 2008 08:57:39 IST
|
|
|
hey anusha can u explain the second line in the output...........how can it be 11,12 etc
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28 Mar 2008 13:40:32 IST
|
|
|
bcoz *ptr + 1. increments value of *ptr. this remains unchanged = 0 th element 10. only i changes 1 - 5.
NOT *(ptr+1) like before. note the paranthesis!!!!!!!!!!!
|
" From ashes a fire shall be woken From shadows a light shall spring " ---Tolkien
" Throughout the centuries there were men who took first steps down new roads armed with nothing but their own vision. " --- Ayn Rand
|
this reply: 2 points
(with 0 
in 1 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28 Mar 2008 14:20:38 IST
|
|
|
*ptr means value of ptr which is 10.now increasing it by 1,2,3,4 gives 11 12 13 14 . !!!!!!!!!!!!!!!
|
Varsha
be cool,
tomorrow is what we make it today,
so if u can dream it , u can make it .
life is an ice cream ,eat it before it melts away!!!!!!!!!
    

|
this reply: 2 points
(with 0 
in 1 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28 Mar 2008 15:59:58 IST
|
|
|
oh now got it.............thnks
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 29 Mar 2008 23:43:11 IST
|
|
|
this one is really a gud one.........
#include #include void main() { int arr[] = { 10 , 20 , 30 , 40 , 50 }
int *p, **q , *t ;
p = arr ; t = arr + 1; q = & t ;
cout<< * p <<" , " << ** q << " , " << * t++ ; }
have a try at this........gud luck.....
|
............................................................................................................................................................................................
There's Light at the end of every Tunnel, so KEEP MOVING....
Best of luck to all my mates....
............................................................................................................................................................................................
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 30 Mar 2008 00:27:09 IST
|
|
|
is d output 10,30,20 ???????
|
this reply: 2 points
(with 0 
in 1 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 30 Mar 2008 09:57:13 IST
|
|
|
is it 10 20 30 ???? !!!!!!!!!!!
|
Varsha
be cool,
tomorrow is what we make it today,
so if u can dream it , u can make it .
life is an ice cream ,eat it before it melts away!!!!!!!!!
    

|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 30 Mar 2008 10:55:43 IST
|
|
|
is it 10,20,20
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 30 Mar 2008 15:14:47 IST
|
|
|
Sneha is absolutely correct.....
it is because.....as in cout statement.....*t++ occurs....and evaluation takes place from left hand side.....then q which was an alias name for t....has now moved to next place..i.e 30........
|
............................................................................................................................................................................................
There's Light at the end of every Tunnel, so KEEP MOVING....
Best of luck to all my mates....
............................................................................................................................................................................................
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 30 Mar 2008 19:39:38 IST
|
|
|
This programs just wat i'd posted in 2nd page. just the array's names different & ive an extra variable thats 2 b printed.
|
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
|
|