Home » Ask & Discuss » Board Exams - CBSE, ICSE, State Boards » Computer Science « Back to Discussion



Computer Science

varsha valli g.'s Avatar
Blazing goIITian

Joined: 31 Jan 2007
Post: 515
30 Mar 2008 18:25:51 IST
0 People liked this
9
584 View Post
quick!!!quick!!!urgent!!!!!
None

give the output:
# include < iostream.h>
void main ()
{
intArray[] = {4,6,10,12};
int *pointer = Array ;
for (int I=1 ; I<=3 ; I++)
{
cout<<*pointer<<#?;
pointer ++;
}
cout<<endl;
for (I=1 ; I<=4 ; I++)
{
(*pointer)*=3 ;
-- pointer;
}
for(I=l; I<5; I + + )
cout << Array [I-1] << ?@?;
cout << endl;
}
plz quick!!!!!!
rates will follow
!!!!!!!!!!!!!


Share this article on:

Comments (9)

ankita raisinghani's Avatar

Cool goIITian

Joined: 22 Jan 2008
Posts: 85
30 Mar 2008 18:30:22 IST
1 people liked this

see this is frm 2007 ppr
4#6#10
varsha valli g.'s Avatar

Blazing goIITian

Joined: 31 Jan 2007
Posts: 515
30 Mar 2008 18:38:03 IST
0 people liked this

i know it plz xplain ur ans
!!!!!!!!!
ankita raisinghani's Avatar

Cool goIITian

Joined: 22 Jan 2008
Posts: 85
30 Mar 2008 18:45:50 IST
1 people liked this

well array name is pointer to its frst value
thn second loop 3 multiplied to each value
third loop array gets displayed (each value displayed)
ankita raisinghani's Avatar

Cool goIITian

Joined: 22 Jan 2008
Posts: 85
30 Mar 2008 18:46:46 IST
0 people liked this

hey circular array hai kya
queue syllabus main
i mean its implementation
 
ankita raisinghani's Avatar

Cool goIITian

Joined: 22 Jan 2008
Posts: 85
30 Mar 2008 18:47:32 IST
0 people liked this

and is thr anythin in particular imp for data file handling
varsha valli g.'s Avatar

Blazing goIITian

Joined: 31 Jan 2007
Posts: 515
30 Mar 2008 18:59:58 IST
0 people liked this

tnkx for the effort!!!!!i got it!!!sort of messed it up
mainly reading and writing objects and the use of seekg ,seekp!!!!
!!!!!!!!!!!
joy francis's Avatar

Blazing goIITian

Joined: 19 Feb 2007
Posts: 1802
30 Mar 2008 19:00:24 IST
1 people liked this

I think it is something like this...
 
int *pointer = Array ; ... this stores the address of the first element of the array in the pointer..
 
cout<<*pointer... would display the value of the array at the address stored in the array...
 
for (int I=1 ; I<=3 ; I++)
{
cout<<*pointer<<#?;
pointer ++;
}
cout<<endl;
..isse u'll get 4#6#10# and then next line...
 
(*pointer)*=3 means every value is now three times so 12,18,30 and 36
 
for(I=l; I<5; I + + )
cout << Array [I-1] << ?@?;
cout << endl;
...would give 12@18@30@36@
 
so output is
4#6#10#
 
 
 
varsha valli g.'s Avatar

Blazing goIITian

Joined: 31 Jan 2007
Posts: 515
30 Mar 2008 19:03:41 IST
0 people liked this

but what about the --p statement ,which value will it decrease
!!!!!!!!!!
joy francis's Avatar

Blazing goIITian

Joined: 19 Feb 2007
Posts: 1802
31 Mar 2008 19:38:20 IST
0 people liked this

IT DON'T MATTER ANYMORE!!!!..YEAAAHHHHH!!!...COMPUTER OVERRRRRRRRR



Quick Reply


Reply

Some HTML allowed.
Keep your comments above the belt or risk having them deleted.
Signup for a avatar to have your pictures show up by your comment
If Members see a thread that violates the Posting Rules, bring it to the attention of the Moderator Team
Free Sign Up!

Preparing for IIT-JEE ?

Arihant Revision Package for IIT JEE - Books, Practice Tests + Rank Predictor


@ INR 1,995/-

For Quick Info

Name

Mobile No.

Find Posts by Topics

Physics.

Topics

Mathematics.

Chemistry.

Biology

Parents

Board

Fun Zone

Sponsored Ads