| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:30:55 IST
|
|
|
heres another
#include<iostream.h> #include<conio.h> void main( ) { char string[ ]="Pointers and strings"; cout<<*(&string[2])<<endl; cout<<string+5; cout<<'\n'; cout<<*(string+3)<<"\n"; }
|
|
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) 22 Mar 2008 22:35:56 IST
|
|
|
i ers and strings n
|
VARSHA KRISHNAN....
------------------------------------
IIT is always a word which rises E thru' d body. But 2 achieve it U hav 2 drain out d entire E out of the body....
|
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) 22 Mar 2008 22:38:40 IST
|
|
|
not the rite ans. but quite close
|
|
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) 22 Mar 2008 22:39:36 IST
|
|
|
edited my reply
|
VARSHA KRISHNAN....
------------------------------------
IIT is always a word which rises E thru' d body. But 2 achieve it U hav 2 drain out d entire E out of the body....
|
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) 22 Mar 2008 22:43:21 IST
|
|
|
edited ones rite. gr8 goin
|
|
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) 22 Mar 2008 22:57:08 IST
|
|
|
edited
|
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) 22 Mar 2008 22:59:10 IST
|
|
|
@sneha, its
i ers and strings n
|
|
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) 22 Mar 2008 23:00:43 IST
|
|
|
could u xplain how ???
plz.............
|
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) 22 Mar 2008 23:05:02 IST
|
|
|
cout<<*(&string[2]) will print string[2], the third character, which is i cout<<string+5 will print everythin after string[5] cout<<*(string+3) will print string[3], which is n
|
|
this reply: 5 points
(with 1 
in 1 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 23:07:15 IST
|
|
|
thanks i thought it wrong.............
|
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) 22 Mar 2008 23:10:22 IST
|
|
|
void main( ) { int a[ ]={10,15,20,25,30}; int *ptr; ptr=a; int i; for(i=0;i<5;i++) cout<<*(ptr+i)<<" "; cout<<endl; for(i=0;i<5;i++) cout<<*ptr+i<<" "; }
|
|
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) 26 Mar 2008 21:38:32 IST
|
|
|
anybody there?
|
|
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) 27 Mar 2008 17:27:32 IST
|
|
|
no 1 interested in practicin outputs?
|
|
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) 27 Mar 2008 17:45:56 IST
|
|
|
d output is:
10 15 20 25 30 10 11 12 13 14
|
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) 27 Mar 2008 17:47:59 IST
|
|
|