Free Exam: pct test 4 aptitude
Number of Questions in Test: 23
Number of Questions in Preview: 5
Register to view all questions.
Note: Answers are not shown below but will be copied with this test.
Copy this test to my quiz maker account
Register with ClassMarker to copy free tests to give to your Test takers.
Register nowQuestion 1
#include<iostream>
using namespace std;
main() {
class student {
int rno = 10;
} v;
cout<<v.rno;
}
using namespace std;
main() {
class student {
int rno = 10;
} v;
cout<<v.rno;
}
Type: | Multiple choice |
Points: | 1 |
Randomize answers: | No |
Question 2
what is the output ?
#include <iostream>
using namespace std;
class Test
{
int x;
Test() { x = 5;}
};
int main()
{
Test *t = new Test;
cout << t->x;
}
#include <iostream>
using namespace std;
class Test
{
int x;
Test() { x = 5;}
};
int main()
{
Test *t = new Test;
cout << t->x;
}
Type: | Multiple choice |
Points: | 2 |
Randomize answers: | No |
Question 3
What happens when delete is used for a NULL pointer?
int *ptr = NULL;
delete ptr;
int *ptr = NULL;
delete ptr;
Type: | Multiple choice |
Points: | 1 |
Randomize answers: | No |
Question 4
Consider the Singly linked list having n elements. What will be the time taken to add an node at the end of linked list if Pointer is initially pointing to first node of the list.
Type: | Multiple choice |
Points: | 2 |
Randomize answers: | No |
Question 5
P is four times as good as workman as Q and therefore is able to finish a job in 40 days less than Q. Working together, they can do it in .......... days:
Type: | Multiple choice |
Points: | 1 |
Randomize answers: | No |