What will be the output of the following C++ code? #include <iostream> #include <string> using namespace std; int main() { string s = "abc"; s[1] = s[2]; cout << s; } Choose the correct option.
Asked in APPSC (Arunachal) Question Booklet (Set-A) of Paper I and Paper II 2026
Show answer
Answer: B. abb
More APPSC Prelims previous year questions questions
- Which CSS property is responsible for defining how overlapping elements are stacked?
- Which CSS selector has the highest specificity?
- Statement 1 : Metadata in the <head> section can influence rendering before the browser constructs the full DOM. Statement 2 : Browsers ignore the <head> section while parsing HTML. Choose the correct option.
- Microsoft FrontPage primarily relied upon which underlying technology for live server-side site editing?
- GIF animation is limited to what colour depth?
- Which of the following tools would you use to make a freehand selection in Adobe Photoshop?
- Which of the following is not a valid audio file extension?
- Which JavaScript feature allows frames to interact only if they originate from the same protocol, domain and port?