What will be the output of the following program? #include<iostream.h>
#include<string.h>
class CuriousTab
{
int val;
public:
void SetValue(char *str1, char *str2)
{
val = strcspn(str1, str2);
}
void ShowValue()
{
cout<< val;
}
};
int main()
{
CuriousTab objCuriousTab;
objCuriousTab.SetValue((char*)"India", (char*)"CuriousTab");
objCuriousTab.ShowValue();
return 0;
}
Discussion & Comments