C++ Programming 4
Questions Result & StatisticsQuiz-summary
0 of 20 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
Information
Questions
Instruction:
- Total number of questions : 20
- Time allotted : 25 minutes.
- Each question carry 1 mark, no negative marks.
- Click the “Finish quiz” button given in bottom of this page to submit your answer.
- Test will be submitted automatically if the time expired.
- Don’t refresh the page.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
Marks : 0 of 20 questions answered correctly | ||
Total number of questions | : | 20 |
Number of currect answered | : | 0 |
Your time | : |
|
Time has elapsed
You have reached 0 of 0 points, (0)
Categories
- Not categorized 0%
-
Thank you for submitting online test!
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- Answered
- Review
-
Question 1 of 20
1. Question
1 pointsCorrectAnswer : A
Explanation : Because array variable and values need to be declared after the data type only.
IncorrectAnswer : A
Explanation : Because array variable and values need to be declared after the data type only.
-
Question 2 of 20
2. Question
1 pointsCorrectAnswer : A
Explanation : The array location starts from zero, So it can accessed by array[6].
IncorrectAnswer : A
Explanation : The array location starts from zero, So it can accessed by array[6].
-
Question 3 of 20
3. Question
1 pointsCorrectAnswer : C
Explanation : No answer description
IncorrectAnswer : C
Explanation : No answer description
-
Question 4 of 20
4. Question
1 points.
What is the output of this program?
#include <stdio.h>
using namespace std;
int main()
{
int a = 5, b = 10, c = 15;
int arr[3] = {&a, &b, &c};
cout << *arr[*arr[1] – 8];
return 0;
}
CorrectAnswer : D
Explanation : The conversion is invalid in this array. So it will give error.
IncorrectAnswer : D
Explanation : The conversion is invalid in this array. So it will give error.
-
Question 5 of 20
5. Question
1 points.
What is the output of this program?
#include <stdio.h>
using namespace std;
int main()
{
char str[5] = “ABC”;
cout << str[3];
cout << str;
return 0;
}
CorrectAnswer : A
Explanation : We are just printing the values of first 3 values.
IncorrectAnswer : A
Explanation : We are just printing the values of first 3 values.
-
Question 6 of 20
6. Question
1 points.
What is the output of this program?
#include <stdio.h>
using namespace std;
int main()
{
int array[] = {10, 20, 30};
cout << -2[array];
return 0;
}
CorrectAnswer : C
Explanation : It’s just printing the negative value of the concern element.
IncorrectAnswer : C
Explanation : It’s just printing the negative value of the concern element.
-
Question 7 of 20
7. Question
1 pointsCorrectAnswer : A
No answer description.
IncorrectAnswer : A
No answer description.
-
Question 8 of 20
8. Question
1 pointsCorrectAnswer : D
No answer description.
IncorrectAnswer : D
No answer description.
-
Question 9 of 20
9. Question
1 pointsCorrectAnswer : A
No answer description.
IncorrectAnswer : A
No answer description.
-
Question 10 of 20
10. Question
1 pointsCorrectAnswer : A
No answer description.
IncorrectAnswer : A
No answer description.
-
Question 11 of 20
11. Question
1 pointsCorrectAnswer : C
No answer description.
IncorrectAnswer : C
No answer description.
-
Question 12 of 20
12. Question
1 pointsCorrectAnswer : C
No answer description.
IncorrectAnswer : C
No answer description.
-
Question 13 of 20
13. Question
1 pointsCorrectAnswer : B
No answer description.
IncorrectAnswer : B
No answer description.
-
Question 14 of 20
14. Question
1 pointsCorrectAnswer : B
No answer description.
IncorrectAnswer : B
No answer description.
-
Question 15 of 20
15. Question
1 pointsCorrectAnswer : C
No answer description.
IncorrectAnswer : C
No answer description.
-
Question 16 of 20
16. Question
1 pointsCorrectAnswer : B
Explanation : It operates on a pointer variable, and returns an l-value equivalent to the value at the pointer address.
IncorrectAnswer : B
Explanation : It operates on a pointer variable, and returns an l-value equivalent to the value at the pointer address.
-
Question 17 of 20
17. Question
1 pointsCorrectAnswer : C
Explanation : Derefencing is using a pointer with asterix. For example, *(abc).
IncorrectAnswer : C
Explanation : Derefencing is using a pointer with asterix. For example, *(abc).
-
Question 18 of 20
18. Question
1 pointsCorrectAnswer : C
No answer description.
IncorrectAnswer : C
No answer description.
-
Question 19 of 20
19. Question
1 points.
In object oriented programming, by wrapping up characteristics and behaviour into one unit, we achieve
CorrectAnswer : C
No answer description.
IncorrectAnswer : C
No answer description.
-
Question 20 of 20
20. Question
1 pointsCorrectAnswer : C
No Explanation
IncorrectAnswer : C
No Explanation