Computer Science, asked by ajayjayalal675, 8 months ago

Find and write the output of the following C++ program code:

Note: Assume all required header files are already being included in

the program.

void main( )

{

int Ar[ ] = { 6 , 3 , 8 , 10 , 4 , 6 , 7} ;

int *Ptr = Ar , I ;

cout<<++*Ptr++ << '@' ;

I = Ar[3] - Ar[2] ;

cout<<++*(Ptr+I)<<'@'<<"\n" ;

cout<<++I + *Ptr++ << '@' ;

cout<<*Ptr++ <<'@'<< '\n' ;

for( ; I >=0 ; I -=2)

cout<<Ar[I] << '@' ;

}​

Answers

Answered by tiger009
1

C++ Programming Language

Output:

7@11@

6@8@

11@3@

Explanation:

In the following program that is written in the C++ Programming Language.

  • Declare integer data type variable 'Ar' and initialize the following elements in it.
  • Set the integer pointer data type variable 'Ptr' and initialize variable 'Ar' and the variable 'I' in it.
  • Then, print the pointer elements with the pre and the post-increment with @.
  • Finally, set the for loop that prints the elements of the array with @.

Learn More:

https://brainly.in/question/5986161

Similar questions