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[20] = "\'H3ll0\'";
for(int i=0;i<8;i++)
{
cout<<(bool)ispunct(arr[i]);
}
}
#include <iostream>
#include <cctype>
using namespace std;
int main(int argc, char const *argv[])
{
char arr[20] = "\'H3ll0\'";
for(int i=0;i<8;i++)
{
cout<<(bool)ispunct(arr[i]);
}
}A. 10000010
B. 111111111110
C. 111000111110
D. 111110000000
Answer: Option A

Join The Discussion