Discussion :: Functions - C++
-
What will be the output of the following program?
#include #include class Freshergate { char txtMsg[50]; public: Freshergate(char *str = NULL) { if(str != NULL) strcpy(txtMsg, str); } int GateFunction(char ch); }; int Freshergate::GateFunction(char ch) { static int i = 0; if(txtMsg[i++] == ch) return strlen((txtMsg + i)) - i; else return GateFunction(ch); } int main() { Freshergate objGate("Welcome to Freshergate.com!"); cout't'); return 0; }
Answer : Option A
Explanation :
No answer description available for this question.
Be The First To Comment

Whatsapp
Facebook