6 .
Which of the following is true about recursive function ?
i. it is also called circular definition
ii. it occurs when a function calls another function more than once
iii. it occurs when a statement within the function calls the function itself
iv. a recursive function cannot have a return statement within it
A.i and iii
B. i and ii
C. ii and iv
D.i, iii and iv
E.None of these
View AnswerAns: i and iii
7 .
The output of this code is :
{
int a = 5;
int b = 10;
cout << (a>b?a:b);
}
A.5
B. 10
C. 20
D.Syntax error
E.None of the above
View AnswerAns: 10
8 .
What is the output of the following code ?
void main()
{
int i = 100, j = 200;
const int *p=&i;
p = &j;
printf("%d",*p);
}
A.100
B. 200
C. 300
D.400
E.None of the above
View AnswerAns: 200
9 .
The output of this code is :
main()
{
long i = 30000;
printf("%d", i);
}
A.3000
B. 30000
C. 0
D.-1
E.1
View AnswerAns: 30000
10 .
What is the output of the following program code ?