String literal modification
What is the output of this program?
#include <iostream>
int main() {
char* a = const_cast<char*>("Hello");
a[4] = '\0';
std::cout << a;
}
Sign in to answer questions and track your progress
Sign InWhat is the output of this program?
#include <iostream>
int main() {
char* a = const_cast<char*>("Hello");
a[4] = '\0';
std::cout << a;
}
Sign in to answer questions and track your progress
Sign In