What will be the output of the following C++ program? # include <iostream>…
PYQ DSSSB 2018
What will be the output of the following C++ program?
# include <iostream>
using namespace std;
int main(){
char array[10];
int i;
for(i = 0; i < 5; i++)
*(array + i) = 65 + i;
*(array + i) = '\0';
cout << array;
return(0);
}
- A.
ABCDE\0
- B.
ABCDE
- C.
BCDEF
- D.
CDEFG
Attempted by 790 students.
Sign up free to check your answer
Sign up freeLoading lesson…

