Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following C++ code?
#include <iostream>
#include <cctype>
using namespace std;
int main(int argc, char const *argv[])
{
char arr[12] = “H3ll0\tW0r1d”;
for(int i=0;i< 12;i++)
{
cout<<(bool)isprint(arr[i]);
}
}

What will be the output of the following C++ code?
#include <iostream>
#include <cctype>
using namespace std;
int main(int argc, char const *argv[])
{
char arr[12] = “H3ll0\tW0r1d”;
for(int i=0;i< 12;i++)
{
cout<<(bool)isprint(arr[i]);
}
}
a) 111000111110
b) 111111111110
c) 111110111110
d) 111110000000

Answer: c
Explanation: In this program we are checking the presence of alphabets and digits in the string so accordingly one can find the answer.

Join The Discussion