Question 1 :
stack<char> s; // LINE-1
for (int i = 0; i < strlen(str); i++)
s.push(str[i]); // LINE-2
Question 2 :
bool StrCmp(string s1, string s2) {
if (s1.length()>s2.length() || s1.length()<s2.length()) // LINE-1
return 1; // LINE-2
else
return 0; // LINE-3
}
Question 3 :
typedef void (*Fun_Ptr)(int,int); // LINE-1
Fun_Ptr fp = &add; // LINE-2
If ypu dont mind can u explain the program?
ReplyDeleteCould you explain the 3rd program? Please
ReplyDelete