0%
67

1 / 20

Category: ( C++ )

1. What is the time complexity of std::map::find()?

2 / 20

Category: ( C++ )

2. What is the result of this code?

#include

int main() {

int x = 10, y = 20;

std::swap(x, y);

std::cout << x << " " << y; return 0; }

3 / 20

Category: ( C )

3. What will be the output of following program?

#include
void main()
{
int colour = 2;
switch (colour) {
case 0:
printf("Black");
case 1:
printf("Red");
case 2:
printf("Aqua");
case 3:
printf("Green");
default:
printf("Other");
}
}

4 / 20

Category: ( C++ )

4. What is the output of the following?

#include

int main() {

for (int i = 0; i < 5; ++i) { if (i == 3) continue; std::cout << i; } return 0; }

5 / 20

Category: ( C++ )

5. What is the value of x after the following code?

int x = 5;

x = x++ + ++x;

6 / 20

Category: ( C )

6. Which function is used to allocate memory in C?

7 / 20

Category: ( C++ )

7. Which C++ feature does the "Rule of Five" pertain to?

8 / 20

Category: (Java)

8. Which of the following is true about volatile keyword in Java?

9 / 20

Category: (Java)

9. In a hospital management system, the Patient class has methods like admit() and discharge(). These methods' signatures are the same in subclasses but have different implementations. What is this an example of?

10 / 20

Category: (Java)

10. In a concurrent program, which ExecutorService method will block until all submitted tasks are complete?

11 / 20

Category: (Java)

11. In a gaming application, multiple players access a shared leaderboard. Which of the following ensures data consistency?

12 / 20

Category: (Java)

12. What will be the output of the following code?
java
class Test {
public static void main(String[] args) {
String s1 = "abc";
String s2 = new String("abc");
System.out.println(s1 == s2);
}
}

13 / 20

Category: (Java)

13. What is the key difference between LinkedList and ArrayList?

14 / 20

Category: ( C++ )

14. What does std::future provide in C++?

15 / 20

Category: (Java)

15. In a banking application, if a Withdrawal operation exceeds the balance, a BalanceInsufficientException is thrown. What is this an example of?

16 / 20

Category: ( C )

16. Which is true about calloc in C?

17 / 20

Category: ( C )

17. What is the output of this code?

#include

#define VALUE 10 + 5

int main() {

printf("%d", VALUE * 2);

return 0;

}

18 / 20

Category: ( C++ )

18. What is the difference between std::vector and std::list?

19 / 20

Category: ( C )

19. What will be the output of this code?

#include

int main() {

int x = 5;

int y = x++ + ++x;

printf("%d", y);

return 0;

}

20 / 20

Category: ( C )

20. What is the output of the following code?

#include

int main() {

int x = 10;

if (x == 10)

printf("x is 10\n");

else;

printf("x is not 10\n");

return 0;

}

Scroll to Top