1.

What will be the output of the following program?

#include<iostream.h>
#include<string.h> class IndiaBix
{ int val; public: void SetValue(char *str1, char *str2) { val = strcspn(str1, str2); } void ShowValue() { cout<< val; } };
int main() { IndiaBix objBix; objBix.SetValue((char*)"India", (char*)"Bix"); objBix.ShowValue(); return 0; }

A. 2
B. 3
C. 5
D. 8
Answer» C. 5


Discussion

No Comment Found

Related MCQs