What will be the output of the following code?
#include <iostream>
using namespace std;
int main() {
char *s = "hello";
char *p = s;
cout << *(p+3) << " " << s[1] << endl;
}
Ans:
the output is: l e
therefore finally
output: l e
get printed
Get Answers For Free
Most questions answered within 1 hours.