Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Technology Questions
In the following C++ program, what is printed by cout when the array name is passed directly to the output stream? #include <iostream> using namespace std; int main() { int arr[] = {4, 5, 6, 7}; int *p = (arr + 1); cout << arr; return 0; }
Consider the following C++ program involving a structure and pointer: #include <iostream> using namespace std; struct sec { int a; char b; }; int main() { struct sec s = {25, 50}; struct sec *ps = (struct sec *)&s; cout << ps->a << ps->b; return 0; } What is the output of this program when it is run?
In the following C++ program, what value of x is printed after the function call? #include <iostream> using namespace std; void fun(int x, int y) { x = 20; y = 10; } int main() { int x = 10; fun(x, x); cout << x; return 0; }
In C++, what is a function prototype and why is it important when declaring and using functions in a program?
In C++, how would you define a structure, and what is its primary purpose as a user defined data type?
In C++, what is a reference variable and how does it relate to the original variable it is bound to?
In modern C++, how many commonly used ways are there to initialize an int variable with a constant value, and what do they conceptually represent?
In C++, what is an explicit constructor and why would you mark a constructor with the explicit keyword?
In C++ object oriented design, how many primary techniques are commonly discussed for reusing existing classes in a class hierarchy, such as inheritance and composition or aggregation?
In C++ exception handling, what is meant by an exception specification on a function declaration or definition?
In C++ exception handling, which operator or syntax is used to declare a catch all handler that can catch any type of exception?
In C++, to what kind of class can you apply Run Time Type Information (RTTI) features such as dynamic_cast and typeid, in order to identify the actual derived type at run time?
In the C++ Standard Template Library (STL), what do vector containers conceptually represent?
When designing a new container type that works well with the C++ Standard Template Library algorithms, what is the most important component that must be provided?
In C++, what does the one definition rule (ODR) state about how many definitions of an entity such as a function or class may exist in a program?
In C++, what is a key advantage of using friend classes, and how do they affect access control between related classes?
In data structures, what is a stack and which of the following scenarios best illustrates a typical use case for a stack in C++ programs?
In C++, what is the Standard Template Library (STL), and what main components does it provide to support generic programming?
In Java programming, what is a wrapper class and why is it used to wrap primitive data types as objects?
In exception handling, what is stack unwinding and how does it work when an error is thrown at runtime?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79