Category: Programming
-
Python Multiple Choice Quizs Question – Lists
Q 1. Suppose list1 is [1, 5, 9], what is sum(list1)?A. 1B. 15C. 9D. Error Show Answer Answer:-B. 15 Explanation Sum returns the sum of all elements in the list. Q 2. To shuffle the list(say list1) what function do we use?A. list1.shuffle()B. shuffle(list1)C. random.shuffle(list1)D. random.shuffleList(list1) Show Answer Answer:-C. random.shuffle(list1) Explanation Execute in the shell…
-

C++ Programming Quizs Question and Answers – OOPs -2
Q1. Which of the following is a static polymorphism mechanism?A. Function overloadingB. Operator overloadingC. TemplatesD. All of the mentioned Show Answer Answer:-D. All of the mentioned Explanation All the options mentioned above uses static polymorphism mechanism. As the conflicts in all these types of functions are resolved during compile-time. Q 2. Which of the following…
-

C++ Programming Quizs Question and Answers – OOPs
Q 1. Which of the following cannot be a friend?A. FunctionB. ClassC. ObjectD. Operator function Show Answer Answer:-C. Object Explanation Objects of any class cannot be made a friend of any other or same class whereas functions, classes and operator functions can be made a friend. Q 2. Why references are different from pointers?A. A…
-

C++ Programming Quizs Question MCQ – OOPs
Q 1. Which of the following shows multiple inheritances?A. A->B->CB. A->B; A->CC. A,B->CD. B->A Show Answer Answer:-C. A,B->C Explanation In multiple inheritance, a single class is inherited from two classes. So in A,B->C, Class C is inherited from A and B, whereas in A->B->C, C from B and B from A called simple inheritance, in…
-

CSS Quizs Question & Answers – Backgrounds, Borders and Drop Shadow
Q 1. Which of the following property defines the space between cells in a table?A. autoB. borderC. spacingD. border-spacing Show Answer Answer:-D. border-spacing Explanation Syntax: border-spacing: non-negative length(s) | inherit Q 2. Which of the following property defines the visual style of up to four different sides of a border?A. border- imgB. border-colorC. border-visualD. border-style…
-

Java Quizs Question & Answers – Character and Boolean Data Types
Q 1. What will be the output of the following Java program? class mainclass { public static void main(String args[]) { char a = ‘A’; a++; System.out.print((int)a); } } A. 64B. 65C. 67D. 66 Show Answer Answer:-D. 66 Explanation ASCII value of ‘A’ is 65, on using ++ operator character value increments by one. output:$…
-

C++ Programming Quizs Question and Answers – Basics
Q 1.What are the formal parameters in C++?A. Parameters with which functions are calledB. Variables that are never used in the functionC. Variables other than passed parameters in a functionD. Parameters which are used in the definition of the function Show Answer Answer:-D. Parameters which are used in the definition of the function Explanation Formal…
-

CSS Quizs Question & Answers – Gradients without Images
Q 1. Which of the following is not a browser-specific versions of linear-gradient()?A. -moz-linear-gradient()B. -mac-linear-gradient()C. -o-linear-gradient()D. -webkit-linear-gradient() Show Answer Answer:-B. -mac-linear-gradient() Q 2. Which of the following argument is not accepted by radial-gradient() function?A. ShapeB. PositionC. Color stopsD. Time Show Answer Answer:-D. Time Q 3. Which of the following function creates a CSS gradient image…
-

CSS Quizs Question & Answers – Targeting Styles with Media Queries
Q1. Which of the following Media Query describe the ratio of the device width to the device height of the media?A. device-aspectB. device-aspect-query C. device-aspect-ratioD. none of the mentioned Show Answer Answer:-B. device-aspect-query Q 2. Which of the following Media Query determines if output is grid, like a simple terminal or phone, or bitmap, like…
-

Java Quizs Question & Answers – Integer and Floating Data Types
Q 1. An expression involving byte, int, and literal numbers is promoted to which of these?A. longB. intC. byteD. float Show Answer Answer:-B. int Explanation An expression involving bytes, ints, shorts, literal numbers, the entire expression is promoted to int before any calculation is done. Q 2. Which of these literals can be contained in…
