Consider the following C++ code snippet and what is the output of ts program?
#include
using namespace std;
int main ( )
{
int array [ ] = {5, 7, 10, 9 };
int **p = (array + 1 );
cout << **array + 10;
system ("pause");
return 0;
}
Answers
Answered by
21
include <iostream>
using namespace std;
int main() {
// your code goes here
int array[]={5,7,10,9 };
int **p=(array+1);
cout<<**array+10;
system("pause");
return 0;
}
using namespace std;
int main() {
// your code goes here
int array[]={5,7,10,9 };
int **p=(array+1);
cout<<**array+10;
system("pause");
return 0;
}
Answered by
0
The above code snip gives an error for an header file and also gives the error to not to recognize the used symbols.
Explanation:
- The header file is a file that is used to define the symbols and function which is used in the program. It is used to tell the compiler about the use of symbols and functions.
- The above code has only the include keyword which is used to add the header file but if there is no header file and include keyword is used then it gives two types of error.
- One error for not include the header file with the include keyword and the second error is not to recognize the symbols which are used in this code because the origin of the symbols is not present.
Learn More:
- Header file : https://brainly.in/question/3256981
Similar questions
Math,
8 months ago
Physics,
1 year ago
Environmental Sciences,
1 year ago
Math,
1 year ago
Math,
1 year ago