Free Online Directory C/C++ MCQs - MCQs Answers

C/C++ MCQs

20 min Score: 0 Attempted: 0/20 Subscribe
1. Which of the following is the correct syntax for defining a function in Python?





2. In which programming language is System.out.println() used?





3. What is the output of print(“Hello” + ” World”) in Python?





4. Which of the following is not a valid data type in Python?





5. What does the following Python code do? list(range(5))





6. What is the output of 2**3 in Python?





7. How do you declare a variable in JavaScript?





8. What is the correct way to comment a single line in C++?





9. In which language is for loop syntax for (int i = 0; i < 10; i++) used?





10. What will be the output of print(0.1 + 0.2 == 0.3) in Python?





11. Which operator is used for string concatenation in JavaScript?





12. What is the purpose of the return statement in a function?





13. How do you create an array in Python?





14. Which of the following is a correct syntax to declare a variable in Python?





15. What is the output of console.log(typeof null) in JavaScript?





16. Which of the following keywords is used to define a class in Java?





17. What does the break statement do in a loop?





18. How do you add a comment in JavaScript?

19. What will the expression 10 % 3 evaluate to?





20. How do you create a dictionary in Python?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials