0% 67 Year1st Year2nd Year3rd Year4th YearStateAndhra PradeshArunachal PradeshAssamBiharChhattisgarhGoaGujaratHaryanaHimachal PradeshJharkhandKarnatakaKeralaMadhya PradeshMaharashtraManipurMeghalayaMizoramNagalandOdishaPunjabRajasthanSikkimTamil NaduTelanganaTripuraUttar PradeshUttarakhandWest Bengal 1 / 20 Category: ( C++ ) 1. What is a nullptr in C++? A) A keyword representing a null pointer B) A type of null object C) A null variable D) A null character 2 / 20 Category: ( C ) 2. Which is true about calloc in C? A) Frees memory B) Resizes memory C) Allocates memory but doesn't initialize D) Allocates and initializes memory to 0 3 / 20 Category: (Java) 3. What happens when Thread.sleep(0) is called? A) The thread yields but does not sleep. B) It gives control to other threads of the same priority. C) The thread sleeps indefinitely. D) Causes a compilation error. 4 / 20 Category: (Java) 4. In the Stream API, which of these is not a terminal operation? A) map() B) reduce() C) collect() D) forEach() 5 / 20 Category: (Java) 5. In an inventory system, you want to restrict access to methods that update product quantities to only admin users. How can you achieve this in Java? A) Use synchronized methods B) Use private methods C) Use final keyword D) Implement access control logic with encapsulation 6 / 20 Category: ( C++ ) 6. What is a friend function in C++? A) A non-member function that has access to private and protected members B) A global function in the class C) A member function with dynamic scope D) A private function 7 / 20 Category: ( C ) 7. What will happen if you access memory beyond the array size in C? A) Program crashes gracefully B) Segmentation fault C) Undefined behavior D) Compiler detects the error 8 / 20 Category: ( C ) 8. What is the output of this program? #include void main() { printf("%d", printf("Hello")); } A) Hello5 B) 5 C) None of the above D) Hello 9 / 20 Category: ( C++ ) 9. Which type of cast is considered safest in C++? A) const_cast B) reinterpret_cast C) dynamic_cast D) static_cast 10 / 20 Category: ( C ) 10. What is the maximum size of a file that can be handled by fseek() in C? A) No limit B) 2 GB C) 4 GB D) Limited by system architecture 11 / 20 Category: ( C++ ) 11. What is the difference between ++i and i++? A) ++i is slower than i++ B) There is no difference C) ++i increments first, i++ increments after evaluation D) i++ increments the value by 2 12 / 20 Category: (Java) 12. In a ticket booking application, multiple users try to book the last available ticket simultaneously. Which Java feature can handle this scenario? A) Synchronization B) Polymorphism C) Exception Handling D) Multithreading 13 / 20 Category: ( C++ ) 13. What is the output of this code? std::string str = "12345"; std::reverse(str.begin(), str.end()); std::cout << str; A) 54321 B) Compilation error C) Undefined behavior D) 12345 14 / 20 Category: ( C ) 14. Determine the output of the C code mentioned below: #include int main() { float q = ‘a’; printf(“%f”, q); return 0; } A) 97.000000 B) a C) a.0000000 D) run time error 15 / 20 Category: ( C++ ) 15. What is emplace_back used for in std::vector? A) To construct an object in-place in the vector B) To add elements at the beginning of the vector C) To remove elements from the vector D) To directly allocate memory 16 / 20 Category: (Java) 16. What is the purpose of the ForkJoinPool class? A) Divide a task into smaller subtasks and execute them concurrently. B) Optimizes performance by limiting thread creation. C) Provides an alternative to ThreadPoolExecutor. D) Manage thread lifecycles in GUIbased programs. 17 / 20 Category: ( C ) 17. What will happen with this code? #include int main() { int a = 5 / 0; printf("%d", a); return 0; } A) Compilation error B) Runtime error C) Undefined behavior D) Prints 0 18 / 20 Category: (Java) 18. What does the following code print? java class Test { public static void main(String[] args) { StringBuilder sb = new StringBuilder("Hello"); sb.insert(0, "Java"); System.out.println(sb); } } A) JavaHello B) Compilation error C) Java D) HelloJava 19 / 20 Category: (Java) 19. In an ecommerce system, you want to hide sensitive user details like passwords. Which OOP principle helps achieve this? A) Abstraction B) Polymorphism C) Inheritance D) Encapsulation 20 / 20 Category: ( C++ ) 20. Which C++ feature allows iteration over a collection without exposing its implementation? A) Static polymorphism B) Type deduction C) Operator overloading D) Range-based for loops Your score is LinkedIn Facebook Twitter VKontakte 0%