Home » C++ Programming » Objects and Classes

What will be the output of the following program? #include #include 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; }

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!