Q1161
What will be the output of the following C++ code? #include #include using namespace std; void Cipher(string str) int r, c; for (int i = 0; str[i]; i++) r = ceil((str[i] - 'a') / 5) + 1; c = ((str[i] - 'a') % 5) + 1; if (str[i] == 'k') r = r - 1; c = 5 - c + 1; else if (str[i] >= 'j') if (c == 1) c = 6; r = r - 1; c = c - 1; cout << r << c; cout << endl; int main() string str = "nsit"; Cipher(str);
A.
33344244
B.
44332434
C.
33432444
AnswerD.
11444323
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board