6. Determine the output of each of the following programs when it is executed. (a)
#include using namespace std;
int main()
{
}
(b)
int j = 0; for (;j;)
cout <“> 0;
#include using namespace std; int main()
{
}
(c)
int j = 1; for (;j;)
cout <“> 0;
#include using namespace std; int main()
{
}
(d)
int j = -6; for (;j;)
cout <>‘\t’; return 0;
#include using namespace std; int main()
{
}
(e)
int j = -6; for (;;);
cout <>‘\t’; return 0;
#include using namespace std; int main()
{
}
(f)
int j = -6; for (;;)
cout <><“\n”;>
#include using namespace std; int main()
{
int j = -6; for (;;j++)
}
(g)
cout <><“\n”;>
#include using namespace std; int main()
{
}
(h)
char ch;
for (ch = ‘A’; ch <=>
return 0;
#include using namespace std; int main()
{
int j;
for ( j = 1; j <=>
{
cout <“j><>‘\t’; j++;
}
return 0;
}
(i)
#include using namespace std; int main()
{
for (int j = 0; j <=>
{
cout <“j><>
}
return 0;
}
(j)
#include using namespace std; int main()
{
for ( float j = 0; j <=><“j><>
return 0;
}
“j>=>“j>=>“j>=>=>“\n”;>“\n”;>“>“>