Question 66
Which code, inserted at line 8, generates the output "100"?
#include <iostream>
using namespace std;
int fun(int);
int main()
{
int *x = new int;
*x=10;
//insert code here
return 0;
}
int fun(int i)
{
return i*i;
}
Question 67
If a function, which is not a method, needs to save any value between its subsequent invocations, this can be done by: (Choose two.)
Question 68
Which of the following statements are correct about an array?
int tab[10];
Question 69
What is the meaning of the following declaration? (Choose two.)
char **ptr;
Question 70
Which code, inserted at line 10, generates the output "Hello World"?
#include <iostream>
#include <string>
using namespace std;
string fun(string, string);
int main()
{
string s="Hello";
string *ps;
ps = &s;
//insert code here
return 0;
}
string fun(string s1, string s2)
{
return s1+s2;
}
