C++ Programming 1
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 : C
Explanation : They must be defined by the users before use, not readily available as primitive data types.
IncorrectAnswer : C
Explanation : They must be defined by the users before use, not readily available as primitive data types.
-
Question 2 of 20
2. Question
1 pointsCorrectAnswer : A
Explanation : The given value is with decimal points, so float or double can be used.
IncorrectAnswer : A
Explanation : The given value is with decimal points, so float or double can be used.
-
Question 3 of 20
3. Question
1 pointsCorrectAnswer : D
Explanation : The unsigned char will ranging between 0 to 255 and valid for only positive values.
IncorrectAnswer : D
Explanation : The unsigned char will ranging between 0 to 255 and valid for only positive values.
-
Question 4 of 20
4. Question
1 pointsCorrectAnswer : D
Explanation : The ASCII value of A is 65 and in character literals it can be represented as 101.
IncorrectAnswer : D
Explanation : The ASCII value of A is 65 and in character literals it can be represented as 101.
-
Question 5 of 20
5. Question
1 points.
what is the output of the following?
#include <iostream>
using namespace std;
int main()
{
char ch = ‘c’
cout << (int(c) + 1);
return 0;
}
CorrectAnswer : B
Explanation : The ASCII value of c is 99. hence after the expression is evaluated and 100 is printed.
IncorrectAnswer : B
Explanation : The ASCII value of c is 99. hence after the expression is evaluated and 100 is printed.
-
Question 6 of 20
6. Question
1 pointsCorrectAnswer : D
Explanation : wchar_t and char is used to represent wide character and character.
IncorrectAnswer : D
Explanation : wchar_t and char is used to represent wide character and character.
-
Question 7 of 20
7. Question
1 points.
. What will be the output of following program?
#include <iostream>
using namespace std;
int main()
{
cout << ‘112’;
return 0;
}
CorrectAnswer : C
Explanation : The literal value for 112 is J. So it will be printing J.
IncorrectAnswer : C
Explanation : The literal value for 112 is J. So it will be printing J.
-
Question 8 of 20
8. Question
1 points.
What is the output for the following program?
#include <iostream>
using namespace std;
int main ()
{
cout << (3 > 4 && 3 > 1) << endl;
return 0;
}
CorrectAnswer : A
Explanation : The logical and operator will return true when both are evaluates to true.
IncorrectAnswer : A
Explanation : The logical and operator will return true when both are evaluates to true.
-
Question 9 of 20
9. Question
1 pointsCorrectAnswer : A
Explanation : (false || true) && false == true && false == false.
IncorrectAnswer : A
Explanation : (false || true) && false == true && false == false.
-
Question 10 of 20
10. Question
1 pointsCorrectAnswer : C
Explanation : int(false) = 0 and bool(99) = true.
IncorrectAnswer : C
Explanation : int(false) = 0 and bool(99) = true.
-
Question 11 of 20
11. Question
1 pointsCorrectAnswer : B
Explanation : false || false || true == false || true == true
IncorrectAnswer : B
Explanation : false || false || true == false || true == true
-
Question 12 of 20
12. Question
1 pointsCorrectAnswer : A
Explanation : Literal integer constants that begin with 0x or 0X are interpreted as hexadecimal.
IncorrectAnswer : A
Explanation : Literal integer constants that begin with 0x or 0X are interpreted as hexadecimal.
-
Question 13 of 20
13. Question
1 pointsCorrectAnswer : B
Explanation : Integer literals are of four types: decimal, octal, hexadecimal and character literals.
IncorrectAnswer : B
Explanation : Integer literals are of four types: decimal, octal, hexadecimal and character literals.
-
Question 14 of 20
14. Question
1 points.
What will be the output of this program?
#include <iostream>
using namespace std;
int main()
{
int a = 8;
cout << “ANDing integer ‘a’ with ‘true’ :” << a && true;
return 0;
}
CorrectAnswer : A
Explanation : If we did the ‘and’ operation between a and true means, there ASCII value will be compared and the output is returned as 8.
IncorrectAnswer : A
Explanation : If we did the ‘and’ operation between a and true means, there ASCII value will be compared and the output is returned as 8.
-
Question 15 of 20
15. Question
1 points.
What is the output of this program?
#include <iostream>
using namespace std;
int main()
{
int i = -3;
int k = i % 2;
cout << k;
return 0;
}
CorrectAnswer : C
Explanation : sign of result of mod operation on negative numbers is sign of dividend
IncorrectAnswer : C
Explanation : sign of result of mod operation on negative numbers is sign of dividend
-
Question 16 of 20
16. Question
1 pointsCorrectAnswer : B
Explanation : No answer description
IncorrectAnswer : B
Explanation : No answer description
-
Question 17 of 20
17. Question
1 pointsCorrectAnswer : B
Explanation : No answer description
IncorrectAnswer : B
Explanation : No answer description
-
Question 18 of 20
18. Question
1 pointsCorrectAnswer : C
Explanation : No answer description
IncorrectAnswer : C
Explanation : No answer description
-
Question 19 of 20
19. Question
1 pointsCorrectAnswer : D
Explanation : No answer description
IncorrectAnswer : D
Explanation : No answer description
-
Question 20 of 20
20. Question
1 pointsCorrectAnswer : C
Explanation : No answer description
IncorrectAnswer : C
Explanation : No answer description