What will be the output of the following programs?
(a) # include < iostream.h >
void main ( )
{
int a [ 5 ], t ;
for (i= 0; i < 5; i ++ )
a [i] = 5 * i;
for (i = 0; i < 5; i ++)
cout << a [ i ];
}
(b) # include < iostream.h >
void main ( )
{
char title [ ] = "Computer";
for ( int i = 0; title [ i ]; i ++)
cout << "\n" << (title + i);
Answers
Answered by
4
What will be the output of the following programs?
(a) # include < iostream.h >
void main ( )
{
int a [ 5 ], t ;
for (i= 0; i < 5; i ++ )
a [i] = 5 * i;
for (i = 0; i < 5; i ++)
cout << a [ i ];
}
(b) # include < iostream.h >
void main ( )
{
char title [ ] = "Computer";
for ( int i = 0; title [ i ]; i ++)
cout << "\n" << (title + i);
PLEASE MAKE ME AS A BRAINLIST ANSWER
Similar questions